Skip to content

Commit 549077d

Browse files
ndreysherbertx
authored andcommitted
crypto: caam - check irq_of_parse_and_map for errors
Irq_of_parse_and_map will return zero in case of error, so add a error check for that. Signed-off-by: Andrey Smirnov <[email protected]> Cc: Chris Healy <[email protected]> Cc: Lucas Stach <[email protected]> Cc: Horia Geantă <[email protected]> Cc: Herbert Xu <[email protected]> Cc: Iuliana Prodan <[email protected]> Cc: [email protected] Cc: [email protected] Reviewed-by: Horia Geantă <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
1 parent 05d2a75 commit 549077d

File tree

1 file changed

+4
-0
lines changed
  • drivers/crypto/caam

1 file changed

+4
-0
lines changed

drivers/crypto/caam/jr.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -537,6 +537,10 @@ static int caam_jr_probe(struct platform_device *pdev)
537537

538538
/* Identify the interrupt */
539539
jrpriv->irq = irq_of_parse_and_map(nprop, 0);
540+
if (!jrpriv->irq) {
541+
dev_err(jrdev, "irq_of_parse_and_map failed\n");
542+
return -EINVAL;
543+
}
540544

541545
/* Now do the platform independent part */
542546
error = caam_jr_init(jrdev); /* now turn on hardware */

0 commit comments

Comments
 (0)