aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2017-02-23 05:31:54 -0500
committerChanwoo Choi <cw00.choi@samsung.com>2017-03-12 23:39:30 -0400
commitbafa687dccbe16cbf9b1824409836d79d6dc6543 (patch)
treeb4d70ab2ac488937f435204731848d11c24e38e9
parent4495c08e84729385774601b5146d51d9e5849f81 (diff)
extcon: int3496: Propagate error code of gpiod_to_irq()
gpiod_to_irq() doesn't return 0. Thus, we just adjust condition and replace -EINVAL by actual error code it returns. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
-rw-r--r--drivers/extcon/extcon-intel-int3496.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/extcon/extcon-intel-int3496.c b/drivers/extcon/extcon-intel-int3496.c
index a3131b036de6..38eb6cab938f 100644
--- a/drivers/extcon/extcon-intel-int3496.c
+++ b/drivers/extcon/extcon-intel-int3496.c
@@ -100,9 +100,9 @@ static int int3496_probe(struct platform_device *pdev)
100 } 100 }
101 101
102 data->usb_id_irq = gpiod_to_irq(data->gpio_usb_id); 102 data->usb_id_irq = gpiod_to_irq(data->gpio_usb_id);
103 if (data->usb_id_irq <= 0) { 103 if (data->usb_id_irq < 0) {
104 dev_err(dev, "can't get USB ID IRQ: %d\n", data->usb_id_irq); 104 dev_err(dev, "can't get USB ID IRQ: %d\n", data->usb_id_irq);
105 return -EINVAL; 105 return data->usb_id_irq;
106 } 106 }
107 107
108 data->gpio_vbus_en = devm_gpiod_get_index(dev, "vbus en", 108 data->gpio_vbus_en = devm_gpiod_get_index(dev, "vbus en",