Skip to content

Commit

Permalink
usb: mtu3: fix error code for getting extcon device
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Chunfeng Yun authored and Greg Kroah-Hartman committed Jan 9, 2018
1 parent 8a99b6a commit 3849c29
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/mtu3/mtu3_plat.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit 3849c29

Please sign in to comment.