aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoger Quadros <rogerq@ti.com>2013-04-17 04:24:25 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-04-17 13:03:07 -0400
commit2bef64b89ae315e7935067ce8db901783deaf857 (patch)
treee35fe6b150072f3298dd5a00e2418943c94eb901
parent7c4ebe68ecdeaa6b2846863c29e248615c366e19 (diff)
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: Roger Quadros <rogerq@ti.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/usb/host/ehci-omap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c
index 5de3e43ded50..3d1491b5f360 100644
--- a/drivers/usb/host/ehci-omap.c
+++ b/drivers/usb/host/ehci-omap.c
@@ -175,12 +175,12 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev)
175 phy = devm_usb_get_phy_by_phandle(dev, "phys", i); 175 phy = devm_usb_get_phy_by_phandle(dev, "phys", i);
176 else 176 else
177 phy = devm_usb_get_phy_dev(dev, i); 177 phy = devm_usb_get_phy_dev(dev, i);
178 if (IS_ERR(phy) || !phy) { 178 if (IS_ERR(phy)) {
179 /* Don't bail out if PHY is not absolutely necessary */ 179 /* Don't bail out if PHY is not absolutely necessary */
180 if (pdata->port_mode[i] != OMAP_EHCI_PORT_MODE_PHY) 180 if (pdata->port_mode[i] != OMAP_EHCI_PORT_MODE_PHY)
181 continue; 181 continue;
182 182
183 ret = IS_ERR(phy) ? PTR_ERR(phy) : -ENODEV; 183 ret = PTR_ERR(phy);
184 dev_err(dev, "Can't get PHY device for port %d: %d\n", 184 dev_err(dev, "Can't get PHY device for port %d: %d\n",
185 i, ret); 185 i, ret);
186 goto err_phy; 186 goto err_phy;