Skip to contentSkip to conversation

crypto: mxc-scc: fix error code in mxc_scc_probe()

PATCH In review Gustavo A. R. Silva 2 participants 2 messages Jun 30, 2017 – Jul 18, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crypto: mxc-scc: fix error code in mxc_scc_probe()

Print and propagate the return value of platform_get_irq on failure.

---
 drivers/crypto/mxc-scc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/crypto/mxc-scc.c +2 -2
index ee4be1b0..e01c463 100644
@@ -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;
 		}
 
Signature · 1 line
2.5.0
maintainer
#1 lore raw
Quoted 3 lines · Gustavo A. R. Silva

Print and propagate the return value of platform_get_irq on failure.

Patch applied. Thanks.

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