0187-usb-mtu3-fix-error-code-for-getting-extcon-device.patch 969 B

1234567891011121314151617181920212223242526
  1. From 3d5564bbc0a39ba07d1bbdaec1f69a3d39c4495e Mon Sep 17 00:00:00 2001
  2. From: Chunfeng Yun <[email protected]>
  3. Date: Wed, 3 Jan 2018 16:53:17 +0800
  4. Subject: [PATCH 187/224] usb: mtu3: fix error code for getting extcon device
  5. When failing to get extcon device, extcon_get_edev_by_phandle()
  6. may return different error codes, but not only -EPROBE_DEFER,
  7. so can't always return -EPROBE_DEFER, and fix it.
  8. Signed-off-by: Chunfeng Yun <[email protected]>
  9. Signed-off-by: Greg Kroah-Hartman <[email protected]>
  10. ---
  11. drivers/usb/mtu3/mtu3_plat.c | 2 +-
  12. 1 file changed, 1 insertion(+), 1 deletion(-)
  13. --- a/drivers/usb/mtu3/mtu3_plat.c
  14. +++ b/drivers/usb/mtu3/mtu3_plat.c
  15. @@ -317,7 +317,7 @@ static int get_ssusb_rscs(struct platfor
  16. otg_sx->edev = extcon_get_edev_by_phandle(ssusb->dev, 0);
  17. if (IS_ERR(otg_sx->edev)) {
  18. dev_err(ssusb->dev, "couldn't get extcon device\n");
  19. - return -EPROBE_DEFER;
  20. + return PTR_ERR(otg_sx->edev);
  21. }
  22. }