From patchwork Thu Aug 16 11:00:25 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Brugger X-Patchwork-Id: 1330791 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 10FAB40211 for ; Thu, 16 Aug 2012 11:01:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756822Ab2HPLBO (ORCPT ); Thu, 16 Aug 2012 07:01:14 -0400 Received: from mail-wi0-f178.google.com ([209.85.212.178]:64765 "EHLO mail-wi0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756283Ab2HPLBM (ORCPT ); Thu, 16 Aug 2012 07:01:12 -0400 Received: by wibhr14 with SMTP id hr14so560259wib.1 for ; Thu, 16 Aug 2012 04:01:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=P/XVrT45sz5W59dFqo1YkYbnnIGRm10LvAUAHjJCVmc=; b=I5DtzUbcvxpH62tH5w6/yLs9FdtgXAQWS4f8QK+rSEB/NLHfDk0bnPgz7FsNSqoDeS NN72NcxN8hZ7L9UczYf2z536e2BBw/rIjE/c+2UBol0LDb6gAtmZdev+SBPO731YEv4K evvaVQOWSf7UWsyeP3iXQB+aZ1k2VBJurNGkN7z/SBAsAmCF6YeeqBg6NMdUSQRBSNId 2Bi1fnwTLa1d2j41x8SLyIGS2LrYa7eTszjmY336YtZu7L9DgMRsfpscN2mO1d3HD9ZD 9wQuX7ugHaI3FKFNMkRz8xBFGW8KqKwlo8Pmq2m/5IeD3et7Wn2cBleYGnCaKFfbKAGb 8Ucg== Received: by 10.180.98.138 with SMTP id ei10mr2265054wib.1.1345114871594; Thu, 16 Aug 2012 04:01:11 -0700 (PDT) Received: from localhost.localdomain (249.Red-80-33-164.staticIP.rima-tde.net. [80.33.164.249]) by mx.google.com with ESMTPS id ep14sm3363924wid.0.2012.08.16.04.01.10 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 16 Aug 2012 04:01:11 -0700 (PDT) From: Matthias Brugger To: Felipe Balbi , Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Matthias Brugger Subject: [PATCH] usb/musb/omap2430.c Delete unused variable. Date: Thu, 16 Aug 2012 13:00:25 +0200 Message-Id: <1345114825-10331-1-git-send-email-mbrugger@iseebcn.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <20120816101917.GK10736@arwen.pp.htv.fi> References: <20120816101917.GK10736@arwen.pp.htv.fi> X-Gm-Message-State: ALoCoQlde07+vhzgfW7vmPnuXExOPE11FfXMYGJ8ogb0341nAloydxL6JL3ouKJwn9UlOL9OhP7i Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Variable ret is always evaluated as true, so we don't need to check it. Signed-off-by: Matthias Brugger --- drivers/usb/musb/omap2430.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c index 5fdb9da..2d207c6 100644 --- a/drivers/usb/musb/omap2430.c +++ b/drivers/usb/musb/omap2430.c @@ -140,7 +140,6 @@ static void omap2430_musb_set_vbus(struct musb *musb, int is_on) struct usb_otg *otg = musb->xceiv->otg; u8 devctl; unsigned long timeout = jiffies + msecs_to_jiffies(1000); - int ret = 1; /* HDRC controls CPEN, but beware current surges during device * connect. They can trigger transient overcurrent conditions * that must be ignored. @@ -164,12 +163,11 @@ static void omap2430_musb_set_vbus(struct musb *musb, int is_on) if (time_after(jiffies, timeout)) { dev_err(musb->controller, "configured as A device timeout"); - ret = -EINVAL; break; } } - if (ret && otg->set_vbus) + if (otg->set_vbus) otg_set_vbus(otg, 1); } else { musb->is_active = 1;