From: Rishabh Bhatnagar <rishabhb@codeaurora.org>
To: martin.blumenstingl@googlemail.com, gregkh@linuxfoundation.org
Cc: linux-usb@vger.kernel.org, linux-arm-msm@vger.kernel.org,
Rishabh Bhatnagar <rishabhb@codeaurora.org>
Subject: Usb: core: Correct self assignment in phy.c
Date: Fri, 6 Apr 2018 16:04:00 -0700 [thread overview]
Message-ID: <1523055840-28858-1-git-send-email-rishabhb@codeaurora.org> (raw)
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 <rishabhb@codeaurora.org>
---
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;
next reply other threads:[~2018-04-06 23:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-06 23:04 Rishabh Bhatnagar [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-04-07 10:55 Usb: core: Correct self assignment in phy.c Martin Blumenstingl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1523055840-28858-1-git-send-email-rishabhb@codeaurora.org \
--to=rishabhb@codeaurora.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=martin.blumenstingl@googlemail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.