Skip to content

Commit b7d65fe

Browse files
tititiou36herbertx
authored andcommitted
crypto: inside-secure - fix an error handling path in safexcel_probe()
'ret' is known to be 0 at this point. If 'safexcel_request_ring_irq()' fails, it returns an error code. Return this value instead of 0 which means success. Signed-off-by: Christophe JAILLET <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
1 parent 5a7801f commit b7d65fe

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/crypto/inside-secure/safexcel.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -839,9 +839,10 @@ static int safexcel_probe(struct platform_device *pdev)
839839
snprintf(irq_name, 6, "ring%d", i);
840840
irq = safexcel_request_ring_irq(pdev, irq_name, safexcel_irq_ring,
841841
ring_irq);
842-
843-
if (irq < 0)
842+
if (irq < 0) {
843+
ret = irq;
844844
goto err_clk;
845+
}
845846

846847
priv->ring[i].work_data.priv = priv;
847848
priv->ring[i].work_data.ring = i;

0 commit comments

Comments
 (0)