crypto: mxs-dcp: Fix platform_get_irq() error handling
Subsystems (2)
Fabio Estevam
reviewerPATCH 1/1 crypto: mxs-dcp: Fix platform_get_irq() error handling
From: Fabio Estevam <[email protected]>
We should test the error case for each platform_get_irq() assignment and propagate the error accordingly.
Signed-off-by Fabio Estevam <[email protected]>
--- drivers/crypto/mxs-dcp.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
drivers/crypto/mxs-dcp.c +7 -2
@@ -908,9 +908,14 @@ static int mxs_dcp_probe(struct platform_device *pdev) iores =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); dcp_vmi_irq =platform_get_irq (pdev,0 ); +if (dcp_vmi_irq <0 ) { + ret = dcp_vmi_irq; + goto err_mutex; + } + dcp_irq =platform_get_irq (pdev,1 ); -if (dcp_vmi_irq <0 || dcp_irq <0 ) { - ret = -EINVAL ; +if (dcp_irq <0 ) { + ret = dcp_irq; goto err_mutex; }
Signature · 1 line
1.8.1.2
Quoted 6 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
We should test the error case for each
platform_get_irq()assignment and propagate the error accordingly.Signed-off-by Fabio Estevam <[email protected]>
Acked-by Marek Vasut <[email protected]>
Best regards,
Marek Vasut
Herbert Xu
maintainerQuoted 9 lines · Marek Vasut
Quoted 6 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
We should test the error case for each
platform_get_irq()assignment and propagate the error accordingly.Signed-off-by Fabio Estevam <[email protected]>Acked-by Marek Vasut <[email protected]>
Patch applied.
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt