提交 2bef64b8 编写于 作者: R Roger Quadros 提交者: Greg Kroah-Hartman

USB: ehci-omap: Improve PHY error handling

As the USB PHY layer never returns NULL we don't need
to check for that condition.
Signed-off-by: NRoger Quadros <rogerq@ti.com>
Acked-by: NAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 7c4ebe68
......@@ -175,12 +175,12 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev)
phy = devm_usb_get_phy_by_phandle(dev, "phys", i);
else
phy = devm_usb_get_phy_dev(dev, i);
if (IS_ERR(phy) || !phy) {
if (IS_ERR(phy)) {
/* Don't bail out if PHY is not absolutely necessary */
if (pdata->port_mode[i] != OMAP_EHCI_PORT_MODE_PHY)
continue;
ret = IS_ERR(phy) ? PTR_ERR(phy) : -ENODEV;
ret = PTR_ERR(phy);
dev_err(dev, "Can't get PHY device for port %d: %d\n",
i, ret);
goto err_phy;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册