crypto: starfive - Fix dev_err_probe return error
Commit Message
Current dev_err_probe will return 0 instead of proper error code if
driver failed to get irq number. Fix the return code.
Signed-off-by: Jia Jie Ho <jiajie.ho@starfivetech.com>
---
drivers/crypto/starfive/jh7110-cryp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On Mon, Dec 04, 2023 at 11:04:13AM +0800, Jia Jie Ho wrote:
> Current dev_err_probe will return 0 instead of proper error code if
> driver failed to get irq number. Fix the return code.
>
> Signed-off-by: Jia Jie Ho <jiajie.ho@starfivetech.com>
> ---
> drivers/crypto/starfive/jh7110-cryp.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Patch applied. Thanks.
@@ -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);