[PATCH 2/3] media: ti: vpe: Fix the error code of devm_request_irq()

Felix Gu posted 3 patches 2 weeks, 6 days ago
There is a newer version of this series
[PATCH 2/3] media: ti: vpe: Fix the error code of devm_request_irq()
Posted by Felix Gu 2 weeks, 6 days ago
Return the actual error code from devm_request_irq() instead of
incorrectly returning -ENOMEM.

Fixes: fc2873aa4a21 ("media: ti: vpe: Add the VIP driver")
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
---
 drivers/media/platform/ti/vpe/vip.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/platform/ti/vpe/vip.c b/drivers/media/platform/ti/vpe/vip.c
index 01d27769cd10..f0354b52048e 100644
--- a/drivers/media/platform/ti/vpe/vip.c
+++ b/drivers/media/platform/ti/vpe/vip.c
@@ -3472,7 +3472,7 @@ static int vip_probe_slice(struct platform_device *pdev, int slice)
 	ret = devm_request_irq(&pdev->dev, dev->irq, vip_irq,
 			       0, VIP_MODULE_NAME, dev);
 	if (ret < 0)
-		return -ENOMEM;
+		return ret;
 
 	spin_lock_init(&dev->slock);
 	mutex_init(&dev->mutex);

-- 
2.43.0
Re: [PATCH 2/3] media: ti: vpe: Fix the error code of devm_request_irq()
Posted by Markus Elfring 2 weeks, 5 days ago
> Return the actual error code from devm_request_irq() instead of
> incorrectly returning -ENOMEM.

Would a summary phrase like “Propagate error code of a devm_request_irq() call
in vip_probe_slice()” be nicer?

Regards,
Markus