From patchwork Wed Aug 22 05:43:18 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 10846 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 04D0123E37 for ; Wed, 22 Aug 2012 05:45:40 +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 D3AA4A183E6 for ; Wed, 22 Aug 2012 05:45:28 +0000 (UTC) Received: by mail-iy0-f180.google.com with SMTP id j38so522658iad.11 for ; Tue, 21 Aug 2012 22:45:39 -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=LE2tCW2rFa6i2wSrBbMvKALP01hr//J2vlK+2Haglig=; b=IPYYyDgf+uudUcgtUZ8LXoRUF50DASOuVkN4FnE25gOFbS++iXMkAW6EEY221l7EFb 0XzslVMVveDZ10gtOiEbOsPbYHr0TfwL8uhidlJctRMHadHtZxMtuFs9j+gdLoQ10tC2 jyDLvUgf5ZxrOZo8TlgvV2o0GWCE0SE6xDNK3Hizbux2pRuUGGSxh2ABTKZjvqx5aGDJ mMDENCAts11SvEUX7WNKQ6uriBc5h7tUskHqFbFi9eOswCkKT5XzYAf9ZVYJg6O22Pep mTFJwr+fvDNhR+bT+wgUhc8LsUbep2B/Hp6tGoVD1shryD9bWtsu3lfkTtNOjDQk1F1x 7NuQ== Received: by 10.42.84.69 with SMTP id k5mr16118128icl.5.1345614339192; Tue, 21 Aug 2012 22:45:39 -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 ex8csp184134igc; Tue, 21 Aug 2012 22:45:38 -0700 (PDT) Received: by 10.68.134.228 with SMTP id pn4mr49591231pbb.147.1345614338586; Tue, 21 Aug 2012 22:45:38 -0700 (PDT) Received: from mail-pb0-f50.google.com (mail-pb0-f50.google.com [209.85.160.50]) by mx.google.com with ESMTPS id iq5si6394627pbc.224.2012.08.21.22.45.38 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 21 Aug 2012 22:45:38 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.50 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.160.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.160.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-pb0-f50.google.com with SMTP id md12so993002pbc.37 for ; Tue, 21 Aug 2012 22:45:38 -0700 (PDT) Received: by 10.68.201.234 with SMTP id kd10mr50535250pbc.141.1345614338351; Tue, 21 Aug 2012 22:45:38 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id os1sm2987450pbc.31.2012.08.21.22.45.35 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 21 Aug 2012 22:45:37 -0700 (PDT) From: Sachin Kamat To: linux-usb@vger.kernel.org Cc: gregkh@linuxfoundation.org, balbi@ti.com, sachin.kamat@linaro.org, patches@linaro.org Subject: [PATCH 4/5] usb: gadget: s3c2410_udc: Move assignment outside if condition Date: Wed, 22 Aug 2012 11:13:18 +0530 Message-Id: <1345614199-12181-5-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1345614199-12181-1-git-send-email-sachin.kamat@linaro.org> References: <1345614199-12181-1-git-send-email-sachin.kamat@linaro.org> X-Gm-Message-State: ALoCoQkO9S8vpz7jWu3c9gKWUuZWK+aAJIL1dUV8ERnL7DDQ7O3P0r6emBFQMVKEtvLshMwtr5rm 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 5ed22d0..921400c 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) { pr_err("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; }