Skip to content

Commit f3ec606

Browse files
Chunfeng Yungregkh
authored andcommitted
usb: mtu3: use dev_err_probe to print error log about extcon
Print an error log when the error number is not -EPROBE_DEFER Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com> Link: https://lore.kernel.org/r/1622182260-23767-4-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 10e93e0 commit f3ec606

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/usb/mtu3/mtu3_plat.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,8 +302,8 @@ static int get_ssusb_rscs(struct platform_device *pdev, struct ssusb_mtk *ssusb)
302302
if (!otg_sx->role_sw_used && of_property_read_bool(node, "extcon")) {
303303
otg_sx->edev = extcon_get_edev_by_phandle(ssusb->dev, 0);
304304
if (IS_ERR(otg_sx->edev)) {
305-
dev_err(ssusb->dev, "couldn't get extcon device\n");
306-
return PTR_ERR(otg_sx->edev);
305+
return dev_err_probe(dev, PTR_ERR(otg_sx->edev),
306+
"couldn't get extcon device\n");
307307
}
308308
}
309309

0 commit comments

Comments
 (0)