2017-06-30 06:42:12

by Gustavo A. R. Silva

[permalink] [raw]
Subject: [PATCH] crypto: mxc-scc: fix error code in mxc_scc_probe()

Print and propagate the return value of platform_get_irq on failure.

Signed-off-by: Gustavo A. R. Silva <[email protected]>
---
drivers/crypto/mxc-scc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/crypto/mxc-scc.c b/drivers/crypto/mxc-scc.c
index ee4be1b0..e01c463 100644
--- a/drivers/crypto/mxc-scc.c
+++ b/drivers/crypto/mxc-scc.c
@@ -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;
}

--
2.5.0


2017-07-18 10:37:02

by Herbert Xu

[permalink] [raw]
Subject: Re: [PATCH] crypto: mxc-scc: fix error code in mxc_scc_probe()

On Fri, Jun 30, 2017 at 01:42:12AM -0500, Gustavo A. R. Silva wrote:
> Print and propagate the return value of platform_get_irq on failure.
>
> Signed-off-by: Gustavo A. R. Silva <[email protected]>

Patch applied. Thanks.
--
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt