Skip to content

Commit

Permalink
usb: musb: jz4740: Silence error if code is -EPROBE_DEFER
Browse files Browse the repository at this point in the history
Avoid printing any error message if the error code is -EPROBE_DEFER.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Signed-off-by: Bin Liu <b-liu@ti.com>
Link: https://lore.kernel.org/r/20191216162432.1256-1-b-liu@ti.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Paul Cercueil authored and Greg Kroah-Hartman committed Dec 30, 2019
1 parent f6ece9b commit ce03cbc
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions drivers/usb/musb/jz4740.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,17 @@ static struct musb_hdrc_platform_data jz4740_musb_platform_data = {
static int jz4740_musb_init(struct musb *musb)
{
struct device *dev = musb->controller->parent;
int err;

if (dev->of_node)
musb->xceiv = devm_usb_get_phy_by_phandle(dev, "phys", 0);
else
musb->xceiv = devm_usb_get_phy(dev, USB_PHY_TYPE_USB2);
if (IS_ERR(musb->xceiv)) {
dev_err(dev, "No transceiver configured\n");
return PTR_ERR(musb->xceiv);
err = PTR_ERR(musb->xceiv);
if (err != -EPROBE_DEFER)
dev_err(dev, "No transceiver configured: %d", err);
return err;
}

/* Silicon does not implement ConfigData register.
Expand Down

0 comments on commit ce03cbc

Please sign in to comment.