Skip to contentSkip to conversation

s5p-mfc: fix error return code in s5p_mfc_probe()

PATCH New Wei Yongjun 2 participants 2 messages Apr 18, 2013 – Apr 19, 2013 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 s5p-mfc: fix error return code in s5p_mfc_probe()

From: Wei Yongjun <[email protected]>

Fix to return a negative error code from the error handling case instead of 0, as returned elsewhere in this function.

---
 drivers/media/platform/s5p-mfc/s5p_mfc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/media/platform/s5p-mfc/s5p_mfc.c +2 -1
index e810b1a..a5853fa 100644
@@ -1110,7 +1110,8 @@ static int s5p_mfc_probe(struct platform_device *pdev)
 	}
 
 	if (pdev->dev.of_node) {
-		if (s5p_mfc_alloc_memdevs(dev) < 0)
+		ret = s5p_mfc_alloc_memdevs(dev);
+		if (ret < 0)
 			goto err_res;
 	} else {
 		dev->mem_dev_l = device_find_child(&dev->plat_dev->dev,
#1 lore raw

PATCH 1/1 s5p-mfc: fix error return code in s5p_mfc_probe()

Hi Wei,

Thank you for your patch.

Best wishes,
Kamil Debski

Quoted 9 lines

From: Wei Yongjun [mailto:weiyj.lk at gmail.com]
Sent: Thursday, April 18, 2013 5:18 AM

From: Wei Yongjun <[email protected]>

Fix to return a negative error code from the error handling case instead of 0, as returned elsewhere in this function.

Quoted 20 lines
---
 drivers/media/platform/s5p-mfc/s5p_mfc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/media/platform/s5p-mfc/s5p_mfc.c +2 -1
index e810b1a..a5853fa 100644
@@ -1110,7 +1110,8 @@ static int s5p_mfc_probe(struct platform_device
 *pdev)
 	}
 
 	if (pdev->dev.of_node) {
-		if (s5p_mfc_alloc_memdevs(dev) < 0)
+		ret = s5p_mfc_alloc_memdevs(dev);
+		if (ret < 0)
 			goto err_res;
 	} else {

dev->mem_dev_l = device_find_child(&dev->plat_dev->dev,