Skip to contentSkip to conversation

crypto: starfive - Fix dev_err_probe return error

PATCH In review Jia Jie Ho 2 participants 2 messages Dec 4, 2023 – Dec 15, 2023

Subsystems (2)
lore
Share & tools
lore

Jia Jie Ho

author maintainer
#0 lore raw

PATCH 1/1 crypto: starfive - Fix dev_err_probe return error

Current dev_err_probe will return 0 instead of proper error code if driver failed to get irq number. Fix the return code.

---
 drivers/crypto/starfive/jh7110-cryp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/crypto/starfive/jh7110-cryp.c +1 -1
index 1e3cadcb179b..cd876fb23ade 100644
@@ -160,7 +160,7 @@ static int starfive_cryp_probe(struct platform_device *pdev)
 	ret = devm_request_irq(&pdev->dev, irq, starfive_cryp_irq, 0, pdev->name,
 			       (void *)cryp);
 	if (ret)
-		return dev_err_probe(&pdev->dev, irq,
+		return dev_err_probe(&pdev->dev, ret,
 				     "Failed to register interrupt handler\n");
 
 	clk_prepare_enable(cryp->hclk);
Signature · 1 line
2.34.1
maintainer
#1 lore raw
Quoted 7 lines · Jia Jie Ho

Current dev_err_probe will return 0 instead of proper error code if driver failed to get irq number. Fix the return code.

---
 drivers/crypto/starfive/jh7110-cryp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch applied. Thanks.

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt