From patchwork Fri Mar 15 09:12:05 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 227890 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id E9D6E2C00D5 for ; Fri, 15 Mar 2013 20:12:32 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753949Ab3COJM1 (ORCPT ); Fri, 15 Mar 2013 05:12:27 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:49502 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753874Ab3COJMY (ORCPT ); Fri, 15 Mar 2013 05:12:24 -0400 Received: from dlelxv30.itg.ti.com ([172.17.2.17]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id r2F9CNV7012009; Fri, 15 Mar 2013 04:12:23 -0500 Received: from DLEE70.ent.ti.com (dlee70.ent.ti.com [157.170.170.113]) by dlelxv30.itg.ti.com (8.13.8/8.13.8) with ESMTP id r2F9CNEG013963; Fri, 15 Mar 2013 04:12:23 -0500 Received: from dlelxv22.itg.ti.com (172.17.1.197) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.2.342.3; Fri, 15 Mar 2013 04:12:23 -0500 Received: from localhost (h78-5.vpn.ti.com [172.24.78.5]) by dlelxv22.itg.ti.com (8.13.8/8.13.8) with ESMTP id r2F9CMqt028148; Fri, 15 Mar 2013 04:12:22 -0500 From: Felipe Balbi To: Linux USB Mailing List CC: Alan Stern , , Greg KH , , Felipe Balbi Subject: [PATCH 4/9] usb: musb: omap2430: fix PHY error handling Date: Fri, 15 Mar 2013 11:12:05 +0200 Message-ID: <1363338730-14581-5-git-send-email-balbi@ti.com> X-Mailer: git-send-email 1.8.2 In-Reply-To: <1363338730-14581-1-git-send-email-balbi@ti.com> References: <1363338730-14581-1-git-send-email-balbi@ti.com> MIME-Version: 1.0 Sender: linux-tegra-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-tegra@vger.kernel.org PHY layer no longer returns NULL. It will return -ENXIO when PHY layer isn't enabled and we can use that to bail out instead of request a probe deferral. Signed-off-by: Felipe Balbi --- drivers/usb/musb/omap2430.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c index ec460ea..798e029 100644 --- a/drivers/usb/musb/omap2430.c +++ b/drivers/usb/musb/omap2430.c @@ -353,7 +353,12 @@ static int omap2430_musb_init(struct musb *musb) else musb->xceiv = devm_usb_get_phy_dev(dev, 0); - if (IS_ERR_OR_NULL(musb->xceiv)) { + if (IS_ERR(musb->xceiv)) { + status = PTR_ERR(musb->xceiv); + + if (status == -ENXIO) + return status; + pr_err("HS USB OTG: no transceiver configured\n"); return -EPROBE_DEFER; }