diff mbox series

[4/5] usb: mtu3: use dev_err_probe to print error log about extcon

Message ID 1622182260-23767-4-git-send-email-chunfeng.yun@mediatek.com
State New
Headers show
Series [1/5] usb: mtu3: remove mtu3_ep0_setup() declaration in mtu3.h | expand

Commit Message

Chunfeng Yun (云春峰) May 28, 2021, 6:10 a.m. UTC
Print an error log when the error number is not -EPROBE_DEFER

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
 drivers/usb/mtu3/mtu3_plat.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/drivers/usb/mtu3/mtu3_plat.c b/drivers/usb/mtu3/mtu3_plat.c
index 7786a95a874e..eaeda391693a 100644
--- a/drivers/usb/mtu3/mtu3_plat.c
+++ b/drivers/usb/mtu3/mtu3_plat.c
@@ -302,8 +302,8 @@  static int get_ssusb_rscs(struct platform_device *pdev, struct ssusb_mtk *ssusb)
 	if (!otg_sx->role_sw_used && of_property_read_bool(node, "extcon")) {
 		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 PTR_ERR(otg_sx->edev);
+			return dev_err_probe(dev, PTR_ERR(otg_sx->edev),
+					     "couldn't get extcon device\n");
 		}
 	}