lkml.org 
[lkml]   [2024]   [Apr]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
Subject[PATCH 3/3] media: bcm2835-unicam: Do not replace IRQ retcode during probe
Use the error code generated by platform_get_irq() and
devm_request_irq() as the error code of probe().

It will give a more accurate reason of why it failed.

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
---
drivers/media/platform/broadcom/bcm2835-unicam.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/media/platform/broadcom/bcm2835-unicam.c b/drivers/media/platform/broadcom/bcm2835-unicam.c
index b2b23d24da19..0b2729bf4a36 100644
--- a/drivers/media/platform/broadcom/bcm2835-unicam.c
+++ b/drivers/media/platform/broadcom/bcm2835-unicam.c
@@ -2660,17 +2660,13 @@ static int unicam_probe(struct platform_device *pdev)
}

ret = platform_get_irq(pdev, 0);
- if (ret < 0) {
- if (ret != -EPROBE_DEFER)
- ret = -EINVAL;
+ if (ret < 0)
goto err_unicam_put;
- }

ret = devm_request_irq(&pdev->dev, ret, unicam_isr, 0,
"unicam_capture0", unicam);
if (ret) {
dev_err(&pdev->dev, "Unable to request interrupt\n");
- ret = -EINVAL;
goto err_unicam_put;
}

--
2.44.0.769.g3c40516874-goog


\
 
 \ /
  Last update: 2024-05-27 18:08    [W:0.068 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site