Skip to contentSkip to conversation

bdisp: fix error return code in bdisp_probe()

PATCH In review Wei Yongjun 2 participants 2 messages Sep 21, 2016 – Sep 22, 2016 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bdisp: fix error return code in bdisp_probe()

From: Wei Yongjun <[email protected]>

Fix to return error code -EINVAL from the platform_get_resource() error handling case instead of 0, as done elsewhere in this function.

---
 drivers/media/platform/sti/bdisp/bdisp-v4l2.c | 1 +
 1 file changed, 1 insertion(+)
drivers/media/platform/sti/bdisp/bdisp-v4l2.c +1 -0
index 45f82b5..8236081 100644
@@ -1337,6 +1337,7 @@ static int bdisp_probe(struct platform_device *pdev)
 	res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
 	if (!res) {
 		dev_err(dev, "failed to get IRQ resource\n");
+		ret = -EINVAL;
 		goto err_clk;
 	}
 
Reviewed-by on v1 1/1
#1 lore raw

Hi Wei,

Thank you for the patch.

Quoted 6 lines · Wei Yongjun

From: Wei Yongjun <[email protected]>

Fix to return error code -EINVAL from the platform_get_resource() error handling case instead of 0, as done elsewhere in this function.

Quoted 16 lines
---
  drivers/media/platform/sti/bdisp/bdisp-v4l2.c | 1 +
  1 file changed, 1 insertion(+)
drivers/media/platform/sti/bdisp/bdisp-v4l2.c +1 -0
index 45f82b5..8236081 100644
@@ -1337,6 +1337,7 @@ static int bdisp_probe(struct platform_device *pdev)
  	res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
  	if (!res) {
  		dev_err(dev, "failed to get IRQ resource\n");
+		ret = -EINVAL;
  		goto err_clk;
  	}