summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChunfeng Yun <chunfeng.yun@mediatek.com>2018-01-03 09:53:17 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-01-09 16:21:27 +0100
commit3849c2901339b97e548104c282b6750bb367bb33 (patch)
treec5a946dc8b56145c7a9eef0412ee44d47da43362
parentARM: dts: r7s72100: add USB device to device tree (diff)
downloadlinux-3849c2901339b97e548104c282b6750bb367bb33.tar.xz
linux-3849c2901339b97e548104c282b6750bb367bb33.zip
usb: mtu3: fix error code for getting extcon device
When failing to get extcon device, extcon_get_edev_by_phandle() may return different error codes, but not only -EPROBE_DEFER, so can't always return -EPROBE_DEFER, and fix it. Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/usb/mtu3/mtu3_plat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/mtu3/mtu3_plat.c b/drivers/usb/mtu3/mtu3_plat.c
index 3650fd11fc49..5b2110bdee96 100644
--- a/drivers/usb/mtu3/mtu3_plat.c
+++ b/drivers/usb/mtu3/mtu3_plat.c
@@ -308,7 +308,7 @@ static int get_ssusb_rscs(struct platform_device *pdev, struct ssusb_mtk *ssusb)
otg_sx->edev = extcon_get_edev_by_phandle(ssusb->dev, 0);
if (IS_ERR(otg_sx->edev)) {
dev_err(ssusb->dev, "couldn't get extcon device\n");
- return -EPROBE_DEFER;
+ return PTR_ERR(otg_sx->edev);
}
}