diff mbox

crypto: mxs-dcp: print error message on platform_get_irq failure

Message ID 20170630065416.GA14743@embeddedgus (mailing list archive)
State Accepted
Delegated to: Herbert Xu
Headers show

Commit Message

Gustavo A. R. Silva June 30, 2017, 6:54 a.m. UTC
Print error message on platform_get_irq failure before return.

Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
---
 drivers/crypto/mxs-dcp.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

Comments

Herbert Xu July 18, 2017, 10:36 a.m. UTC | #1
On Fri, Jun 30, 2017 at 01:54:16AM -0500, Gustavo A. R. Silva wrote:
> Print error message on platform_get_irq failure before return.
> 
> Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>

Patch applied.  Thanks.
diff mbox

Patch

diff --git a/drivers/crypto/mxs-dcp.c b/drivers/crypto/mxs-dcp.c
index 625ee50..764be3e 100644
--- a/drivers/crypto/mxs-dcp.c
+++ b/drivers/crypto/mxs-dcp.c
@@ -908,12 +908,16 @@  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)
+	if (dcp_vmi_irq < 0) {
+		dev_err(dev, "Failed to get IRQ: (%d)!\n", dcp_vmi_irq);
 		return dcp_vmi_irq;
+	}
 
 	dcp_irq = platform_get_irq(pdev, 1);
-	if (dcp_irq < 0)
+	if (dcp_irq < 0) {
+		dev_err(dev, "Failed to get IRQ: (%d)!\n", dcp_irq);
 		return dcp_irq;
+	}
 
 	sdcp = devm_kzalloc(dev, sizeof(*sdcp), GFP_KERNEL);
 	if (!sdcp)