USB: ehci-omap: Improve PHY error handling
authorRoger Quadros <rogerq@ti.com>
Wed, 17 Apr 2013 08:24:25 +0000 (11:24 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Apr 2013 17:03:07 +0000 (10:03 -0700)
As the USB PHY layer never returns NULL we don't need
to check for that condition.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/ehci-omap.c

index 5de3e43ded50775bf5f2173e564e410b7ba433cd..3d1491b5f3605e68b0a72e1d5786233f5ad94d7b 100644 (file)
@@ -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;