From patchwork Wed Apr 17 08:24:25 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 2452661 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id B67F43FD8C for ; Wed, 17 Apr 2013 08:25:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966080Ab3DQIYj (ORCPT ); Wed, 17 Apr 2013 04:24:39 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:46073 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966075Ab3DQIYi (ORCPT ); Wed, 17 Apr 2013 04:24:38 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id r3H8OTGJ013630; Wed, 17 Apr 2013 03:24:29 -0500 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id r3H8OTwU023522; Wed, 17 Apr 2013 03:24:29 -0500 Received: from dlelxv22.itg.ti.com (172.17.1.197) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.2.342.3; Wed, 17 Apr 2013 03:24:29 -0500 Received: from localhost.localdomain (h56-56.vpn.ti.com [172.24.56.56]) by dlelxv22.itg.ti.com (8.13.8/8.13.8) with ESMTP id r3H8ORDK005742; Wed, 17 Apr 2013 03:24:28 -0500 From: Roger Quadros To: CC: , , , , , , Roger Quadros Subject: [PATCH v2 2/2] USB: ehci-omap: Improve PHY error handling Date: Wed, 17 Apr 2013 11:24:25 +0300 Message-ID: <1366187065-10795-1-git-send-email-rogerq@ti.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1366026636-29198-2-git-send-email-rogerq@ti.com> References: <1366026636-29198-2-git-send-email-rogerq@ti.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org As the USB PHY layer never returns NULL we don't need to check for that condition. CC: Alan Stern Signed-off-by: Roger Quadros Acked-by: Alan Stern --- drivers/usb/host/ehci-omap.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c index 5de3e43..3d1491b 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) 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;