diff mbox series

[4/8] media: imx7-media-csi: Propagate the correct error for platform_get_irq()

Message ID 20190504144027.31920-3-festevam@gmail.com (mailing list archive)
State New, archived
Headers show
Series [1/8] media: dt-bindings: imx7-csi: Document a single CSI clock | expand

Commit Message

Fabio Estevam May 4, 2019, 2:40 p.m. UTC
In the case of platform_get_irq() failure, let's propagate the real error
code instead of a fake one.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
 drivers/staging/media/imx/imx7-media-csi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/staging/media/imx/imx7-media-csi.c b/drivers/staging/media/imx/imx7-media-csi.c
index e0286c322fad..a4cc9a342674 100644
--- a/drivers/staging/media/imx/imx7-media-csi.c
+++ b/drivers/staging/media/imx/imx7-media-csi.c
@@ -1206,7 +1206,7 @@  static int imx7_csi_probe(struct platform_device *pdev)
 	csi->irq = platform_get_irq(pdev, 0);
 	if (csi->irq < 0) {
 		dev_err(dev, "Missing platform resources data\n");
-		return -ENODEV;
+		return csi->irq;
 	}
 
 	csi->regbase = devm_platform_ioremap_resource(pdev, 0);