crypto: mediatek - fix error return code in mtk_crypto_probe()
authorGustavo A. R. Silva <garsilva@embeddedor.com>
Fri, 30 Jun 2017 06:24:54 +0000 (01:24 -0500)
committerHerbert Xu <herbert@gondor.apana.org.au>
Tue, 18 Jul 2017 09:50:54 +0000 (17:50 +0800)
Propagate the return value of platform_get_irq on failure.

Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/mediatek/mtk-platform.c

index 000b6500a22d2fb3d6780203e9f082a74038ea33..b182e941b0cd86141f9a7bc0bef129e43c69743a 100644 (file)
@@ -500,7 +500,7 @@ static int mtk_crypto_probe(struct platform_device *pdev)
                cryp->irq[i] = platform_get_irq(pdev, i);
                if (cryp->irq[i] < 0) {
                        dev_err(cryp->dev, "no IRQ:%d resource info\n", i);
-                       return -ENXIO;
+                       return cryp->irq[i];
                }
        }