crypto: mxc-scc - fix error code in mxc_scc_probe()
authorGustavo A. R. Silva <garsilva@embeddedor.com>
Fri, 30 Jun 2017 06:42:12 +0000 (01:42 -0500)
committerHerbert Xu <herbert@gondor.apana.org.au>
Tue, 18 Jul 2017 09:50:54 +0000 (17:50 +0800)
Print and 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/mxc-scc.c

index ee4be1b0d30ba1e0eb38262026b6e8a13d32b6fb..e01c46387df8d8823f4a9434ea0db3b9992583c4 100644 (file)
@@ -708,8 +708,8 @@ static int mxc_scc_probe(struct platform_device *pdev)
        for (i = 0; i < 2; i++) {
                irq = platform_get_irq(pdev, i);
                if (irq < 0) {
-                       dev_err(dev, "failed to get irq resource\n");
-                       ret = -EINVAL;
+                       dev_err(dev, "failed to get irq resource: %d\n", irq);
+                       ret = irq;
                        goto err_out;
                }