Skip to contentSkip to conversation

usb: gadget: s3c2410_udc: fix error return code in s3c2410_udc_probe()

PATCH New Wei Yongjun 2 participants 2 messages May 7, 2013 – May 8, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usb: gadget: s3c2410_udc: fix error return code in s3c2410_udc_probe()

From: Wei Yongjun <[email protected]>

Fix to return a negative error code in the gpio_to_irq() error handling case instead of 0, as done elsewhere in this function.

---
 drivers/usb/gadget/s3c2410_udc.c | 1 +
 1 file changed, 1 insertion(+)
drivers/usb/gadget/s3c2410_udc.c +1 -0
index d0e75e1..c974776 100644
@@ -1851,6 +1851,7 @@ static int s3c2410_udc_probe(struct platform_device *pdev)
 		irq = gpio_to_irq(udc_info->vbus_pin);
 		if (irq < 0) {
 			dev_err(dev, "no irq for gpio vbus pin\n");
+			retval = irq;
 			goto err_gpio_claim;
 		}
 
#1 lore raw

PATCH 1/1 usb: gadget: s3c2410_udc: fix error return code in s3c2410_udc_probe()

Quoted 7 lines · Wei Yongjun

From: Wei Yongjun <[email protected]>

Fix to return a negative error code in the gpio_to_irq() error handling case instead of 0, as done elsewhere in this function.

Best regards,
Jingoo Han

Quoted 21 lines
---
 drivers/usb/gadget/s3c2410_udc.c | 1 +
 1 file changed, 1 insertion(+)
drivers/usb/gadget/s3c2410_udc.c +1 -1
index d0e75e1..c974776 100644
@@ -1851,6 +1851,7 @@ static int s3c2410_udc_probe(struct platform_device *pdev)
 		irq = gpio_to_irq(udc_info->vbus_pin);
 		if (irq < 0) {
 			dev_err(dev, "no irq for gpio vbus pin\n");
+			retval = irq;
 			goto err_gpio_claim;
 		}
 
 
--

To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html