Skip to content

Commit 05b0b07

Browse files
ribaldapinchartl
authored andcommitted
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>
1 parent abfec2e commit 05b0b07

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

drivers/media/platform/broadcom/bcm2835-unicam.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2661,17 +2661,15 @@ static int unicam_probe(struct platform_device *pdev)
26612661
}
26622662

26632663
ret = platform_get_irq(pdev, 0);
2664-
if (ret <= 0) {
2664+
if (ret < 0) {
26652665
dev_err(&pdev->dev, "No IRQ resource\n");
2666-
ret = -EINVAL;
26672666
goto err_unicam_put;
26682667
}
26692668

26702669
ret = devm_request_irq(&pdev->dev, ret, unicam_isr, 0,
26712670
"unicam_capture0", unicam);
26722671
if (ret) {
26732672
dev_err(&pdev->dev, "Unable to request interrupt\n");
2674-
ret = -EINVAL;
26752673
goto err_unicam_put;
26762674
}
26772675

0 commit comments

Comments
 (0)