From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965244AbbHKPNH (ORCPT ); Tue, 11 Aug 2015 11:13:07 -0400 Received: from mail-qk0-f178.google.com ([209.85.220.178]:33709 "EHLO mail-qk0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752281AbbHKPNF (ORCPT ); Tue, 11 Aug 2015 11:13:05 -0400 From: Kris Borer To: gregkh@linuxfoundation.org Cc: stern@rowland.harvard.edu, pmladek@suse.cz, peter.chen@freescale.com, balbi@ti.com, baolu.lu@linux.intel.com, mjg59@coreos.com, Robert.Schlabbach@gmx.net, chasemetzger15@gmail.com, jin.can.zhuang@intel.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Kris Borer Subject: [PATCH] usb: hub: remove assignment from if condition Date: Tue, 11 Aug 2015 11:12:45 -0400 Message-Id: <1439305965-3497-1-git-send-email-kborer@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix one occurrence of the checkpatch.pl error: ERROR: do not use assignment in if condition The semantic patch that makes this change is: // @@ identifier i; expression E, E2, E3; statement S1, S2; binary operator b; @@ + i = E; if ( - (i = E) + i b ... && E2 && E3 ) S1 else S2 // Signed-off-by: Kris Borer --- drivers/usb/core/hub.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index a0b22be..78bd0d6 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c @@ -671,8 +671,8 @@ resubmit: if (hub->quiescing) return; - if ((status = usb_submit_urb(hub->urb, GFP_ATOMIC)) != 0 - && status != -ENODEV && status != -EPERM) + status = usb_submit_urb(hub->urb, GFP_ATOMIC); + if (status != 0 && status != -ENODEV && status != -EPERM) dev_err(hub->intfdev, "resubmit --> %d\n", status); } -- 1.9.1