All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] crypto: mxs-dcp: Fix platform_get_irq() error handling
@ 2014-02-14  3:04 Fabio Estevam
  2014-02-14  8:22 ` Marek Vasut
  0 siblings, 1 reply; 3+ messages in thread
From: Fabio Estevam @ 2014-02-14  3:04 UTC (permalink / raw)
  To: herbert; +Cc: marex, linux-crypto, Fabio Estevam

From: Fabio Estevam <fabio.estevam@freescale.com>

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>
---
 drivers/crypto/mxs-dcp.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/crypto/mxs-dcp.c b/drivers/crypto/mxs-dcp.c
index 37e0706..08761d6 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;
 	}
 
-- 
1.8.1.2

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] crypto: mxs-dcp: Fix platform_get_irq() error handling
  2014-02-14  3:04 [PATCH] crypto: mxs-dcp: Fix platform_get_irq() error handling Fabio Estevam
@ 2014-02-14  8:22 ` Marek Vasut
  2014-02-25 12:18   ` Herbert Xu
  0 siblings, 1 reply; 3+ messages in thread
From: Marek Vasut @ 2014-02-14  8:22 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: herbert, linux-crypto, Fabio Estevam

On Friday, February 14, 2014 at 04:04:44 AM, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
> 
> 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>

Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] crypto: mxs-dcp: Fix platform_get_irq() error handling
  2014-02-14  8:22 ` Marek Vasut
@ 2014-02-25 12:18   ` Herbert Xu
  0 siblings, 0 replies; 3+ messages in thread
From: Herbert Xu @ 2014-02-25 12:18 UTC (permalink / raw)
  To: Marek Vasut; +Cc: Fabio Estevam, linux-crypto, Fabio Estevam

On Fri, Feb 14, 2014 at 09:22:03AM +0100, Marek Vasut wrote:
> On Friday, February 14, 2014 at 04:04:44 AM, Fabio Estevam wrote:
> > From: Fabio Estevam <fabio.estevam@freescale.com>
> > 
> > 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>

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-02-25 12:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-14  3:04 [PATCH] crypto: mxs-dcp: Fix platform_get_irq() error handling Fabio Estevam
2014-02-14  8:22 ` Marek Vasut
2014-02-25 12:18   ` Herbert Xu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.