浏览代码

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 <christophe.jaillet@wanadoo.fr>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Christophe Jaillet 8 年之前
父节点
当前提交
b7d65fe181
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      drivers/crypto/inside-secure/safexcel.c

+ 3 - 2
drivers/crypto/inside-secure/safexcel.c

@@ -839,9 +839,10 @@ static int safexcel_probe(struct platform_device *pdev)
 		snprintf(irq_name, 6, "ring%d", i);
 		irq = safexcel_request_ring_irq(pdev, irq_name, safexcel_irq_ring,
 						ring_irq);
-
-		if (irq < 0)
+		if (irq < 0) {
+			ret = irq;
 			goto err_clk;
+		}
 
 		priv->ring[i].work_data.priv = priv;
 		priv->ring[i].work_data.ring = i;