mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-14 14:34:28 +08:00
media: bcm2835-unicam: Do not replace IRQ retcode during probe
platform_get_irq() cannot return the value 0. It will either return a non-zero irq or a errcode. If a errcode is returned, we need to populate the error code upwards. It will give a more accurate reason of why it failed to the caller, who might decide to retry later. Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Link: https://lore.kernel.org/r/20240506-fix-broad-v2-1-e6a2a5c0d609@chromium.org Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
parent
abfec2e172
commit
05b0b07953
@ -2661,9 +2661,8 @@ static int unicam_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
ret = platform_get_irq(pdev, 0);
|
||||
if (ret <= 0) {
|
||||
if (ret < 0) {
|
||||
dev_err(&pdev->dev, "No IRQ resource\n");
|
||||
ret = -EINVAL;
|
||||
goto err_unicam_put;
|
||||
}
|
||||
|
||||
@ -2671,7 +2670,6 @@ static int unicam_probe(struct platform_device *pdev)
|
||||
"unicam_capture0", unicam);
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "Unable to request interrupt\n");
|
||||
ret = -EINVAL;
|
||||
goto err_unicam_put;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user