summaryrefslogtreecommitdiffstats
path: root/drivers/crypto/mxs-dcp.c
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2014-02-14 04:04:44 +0100
committerHerbert Xu <herbert@gondor.apana.org.au>2014-02-26 22:56:54 +0100
commitd9588f874482c0163caf19c2acbe5ce6260d42bf (patch)
tree4160f85e1e0046e6761de3aec3a010e01574c74d /drivers/crypto/mxs-dcp.c
parentcrypto: remove a duplicate checks in __cbc_decrypt() (diff)
downloadlinux-d9588f874482c0163caf19c2acbe5ce6260d42bf.tar.xz
linux-d9588f874482c0163caf19c2acbe5ce6260d42bf.zip
crypto: mxs-dcp - Fix platform_get_irq() error handling
We should test the error case for each platform_get_irq() assignment and propagate the error accordingly. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Marek Vasut <marex@denx.de> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/mxs-dcp.c')
-rw-r--r--drivers/crypto/mxs-dcp.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/crypto/mxs-dcp.c b/drivers/crypto/mxs-dcp.c
index 37e070670702..08761d61d4f5 100644
--- a/drivers/crypto/mxs-dcp.c
+++ b/drivers/crypto/mxs-dcp.c
@@ -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;
}