From patchwork Fri Apr 6 23:04:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rishabh Bhatnagar X-Patchwork-Id: 10327701 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7375360541 for ; Fri, 6 Apr 2018 23:04:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 62C5229043 for ; Fri, 6 Apr 2018 23:04:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 552A22931A; Fri, 6 Apr 2018 23:04:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 272BC29043 for ; Fri, 6 Apr 2018 23:04:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752093AbeDFXEa (ORCPT ); Fri, 6 Apr 2018 19:04:30 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:50116 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751956AbeDFXE3 (ORCPT ); Fri, 6 Apr 2018 19:04:29 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 0805060817; Fri, 6 Apr 2018 23:04:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1523055869; bh=t+RyxjjYd0P28JGWPddWsp8C0j0gr3XEOpfvxThHzkA=; h=From:To:Cc:Subject:Date:From; b=GQg6xQLxMoumoliA8Z54CTvr47qu/tSXcGby5VV3MX3Kl0g7bS/FTa+7MwfGZxr9Q NeolTBI2LkPR0eu1HBcYHLhgJbxDTDde29/ymuRr5zSXI0LJ4Wr1f6p5Eb5LRbVw7X aqaHT4UhFyJD8gTY+/vWpvd4ytSHh0JdEsLB+vbE= Received: from rishabhb-linux.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: rishabhb@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 43975600D0; Fri, 6 Apr 2018 23:04:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1523055868; bh=t+RyxjjYd0P28JGWPddWsp8C0j0gr3XEOpfvxThHzkA=; h=From:To:Cc:Subject:Date:From; b=f7CN3cLNWz6Xl0fS+aIhwff1gEjbs0azkYYtizRyKl3wNkbfQCUOx5BuaLvNC4a/3 zmW3PTRU9AOPjZZUtOF5RUF/ZSed9t7bHVYU1l5u57ORJgeOoMd3uqp7inaZh8x/Tb UkXGlSMo3hdzu17UTNCQN+R+p8xYYz0nCc8nfoww= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 43975600D0 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=rishabhb@codeaurora.org From: Rishabh Bhatnagar To: martin.blumenstingl@googlemail.com, gregkh@linuxfoundation.org Cc: linux-usb@vger.kernel.org, linux-arm-msm@vger.kernel.org, Rishabh Bhatnagar Subject: [PATCH] Usb: core: Correct self assignment in phy.c Date: Fri, 6 Apr 2018 16:04:00 -0700 Message-Id: <1523055840-28858-1-git-send-email-rishabhb@codeaurora.org> X-Mailer: git-send-email 1.9.1 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In file drivers/usb/core/phy.c line 114, ret variable is assigned to itself. The following error was observed: kernel/drivers/usb/core/phy.c:114:8: warning: explicitly assigning value of variable of type 'int' to itself [-Wself-assign] error, forbidden warning: phy.c:114 This error was found when compiling with Clang. Change it to ret = err. Fixes: commit 07dbff0ddbd8 ("usb: core: add a wrapper for the USB PHYs on the HCD") Signed-off-by: Rishabh Bhatnagar --- drivers/usb/core/phy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/core/phy.c b/drivers/usb/core/phy.c index 09b7c43..f19aaa3 100644 --- a/drivers/usb/core/phy.c +++ b/drivers/usb/core/phy.c @@ -111,7 +111,7 @@ int usb_phy_roothub_exit(struct usb_phy_roothub *phy_roothub) list_for_each_entry(roothub_entry, head, list) { err = phy_exit(roothub_entry->phy); if (err) - ret = ret; + ret = err; } return ret;