From patchwork Wed Aug 22 10:19:01 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 10871 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id C346623E1B for ; Wed, 22 Aug 2012 10:21:24 +0000 (UTC) Received: from mail-iy0-f180.google.com (mail-iy0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id 5CF5DA18D22 for ; Wed, 22 Aug 2012 10:21:13 +0000 (UTC) Received: by mail-iy0-f180.google.com with SMTP id j38so707700iad.11 for ; Wed, 22 Aug 2012 03:21:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=dAmN5utNsVcw6GX0fwddKWwCBOtZrEAVEaAigVh+pho=; b=c9BhBDbPbbSJ6hzIQX9AYHLq5Lj2ug7Phs+1oUXPZZ7C+EWidwxXKllYUvxrQZpHcr aSsoLcnzn+PgmfQl/Vv+As+XTRFaOqYlytacRI9D/68ymR1z3OeE9Dii9LQRmf6NT61k trLg090ocNfzkD9mqkAJ73CvWww3W24/1cD4M8h7sBU3PXv3t0HcZo0dReirO5gCvSvT ucduv7XP09tjBunE8U8RP2F/azyVxPgL8J9OupnEopyeur0fa1yEHJjYdrqeZNYsGACG ZARPZeL27OIOS8aLAXps2M91Xj5lQLiZsP/0nJHhLR1DRImUibNpf3ITKF3zRAcHSL5t WSfg== Received: by 10.50.45.162 with SMTP id o2mr1591388igm.0.1345630884268; Wed, 22 Aug 2012 03:21:24 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.184.232 with SMTP id ex8csp194253igc; Wed, 22 Aug 2012 03:21:23 -0700 (PDT) Received: by 10.68.130.163 with SMTP id of3mr52305129pbb.108.1345630883476; Wed, 22 Aug 2012 03:21:23 -0700 (PDT) Received: from mail-pz0-f50.google.com (mail-pz0-f50.google.com [209.85.210.50]) by mx.google.com with ESMTPS id rr1si190476pbc.38.2012.08.22.03.21.23 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 22 Aug 2012 03:21:23 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.210.50 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.210.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.210.50 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) smtp.mail=sachin.kamat@linaro.org Received: by mail-pz0-f50.google.com with SMTP id e7so656102dad.37 for ; Wed, 22 Aug 2012 03:21:23 -0700 (PDT) Received: by 10.66.86.201 with SMTP id r9mr44973403paz.16.1345630883242; Wed, 22 Aug 2012 03:21:23 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id y11sm3421283pbv.66.2012.08.22.03.21.20 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 22 Aug 2012 03:21:22 -0700 (PDT) From: Sachin Kamat To: linux-usb@vger.kernel.org Cc: balbi@ti.com, gregkh@linuxfoundation.org, sachin.kamat@linaro.org, patches@linaro.org Subject: [PATCH v2 4/5] usb: gadget: s3c2410_udc: Move assignment outside if condition Date: Wed, 22 Aug 2012 15:49:01 +0530 Message-Id: <1345630742-29908-5-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1345630742-29908-1-git-send-email-sachin.kamat@linaro.org> References: <1345630742-29908-1-git-send-email-sachin.kamat@linaro.org> X-Gm-Message-State: ALoCoQno4t5FUpZ8uPdxpNQnSc3BmHTMl+sgkR07uCR55dqCJMmOHVp5AxEJ4rpKC6XaybvGdyTe Fixes the following checkpatch errors: ERROR: do not use assignment in if condition Signed-off-by: Sachin Kamat --- drivers/usb/gadget/s3c2410_udc.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/usb/gadget/s3c2410_udc.c b/drivers/usb/gadget/s3c2410_udc.c index d9e3a21..e895ea1 100644 --- a/drivers/usb/gadget/s3c2410_udc.c +++ b/drivers/usb/gadget/s3c2410_udc.c @@ -1696,7 +1696,8 @@ static int s3c2410_udc_start(struct usb_gadget_driver *driver, udc->gadget.dev.driver = &driver->driver; /* Bind the driver */ - if ((retval = device_add(&udc->gadget.dev)) != 0) { + retval = device_add(&udc->gadget.dev); + if (retval) { dev_err(&udc->gadget.dev, "Error in device_add() : %d\n", retval); goto register_error; } @@ -1704,7 +1705,8 @@ static int s3c2410_udc_start(struct usb_gadget_driver *driver, dprintk(DEBUG_NORMAL, "binding gadget driver '%s'\n", driver->driver.name); - if ((retval = bind(&udc->gadget)) != 0) { + retval = bind(&udc->gadget); + if (retval) { device_del(&udc->gadget.dev); goto register_error; }