From: Wei Xu <xuwei5@hisilicon.com>
To: <mchehab+huawei@kernel.org>
Cc: <xuwei5@hisilicon.com>, <linuxarm@huawei.com>,
<shameerali.kolothum.thodi@huawei.com>,
<jonathan.cameron@huawei.com>, <john.garry@huawei.com>,
<salil.mehta@huawei.com>, <shiju.jose@huawei.com>,
<jinying@hisilicon.com>, <zhangyi.ac@huawei.com>,
<liguozhu@hisilicon.com>, <tangkunshan@huawei.com>,
<huangdaode@hisilicon.com>, John Stultz <john.stultz@linaro.org>,
Arnd Bergmann <arnd@arndb.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
<linux-kernel@vger.kernel.org>
Subject: [PATCH] misc: hisi_hikey_usb: fix the uninitialized ret
Date: Tue, 15 Sep 2020 11:01:01 +0800 [thread overview]
Message-ID: <1600138861-187291-1-git-send-email-xuwei5@hisilicon.com> (raw)
The uninitialized ret in hisi_hikey_usb_parse_kirin970 is useless.
Simply remove it and return 0 on success to fix the issue reported
by Coverity Scan.
Fixes: d210a0023590 ("misc: hisi_hikey_usb: add support for Hikey 970")
Signed-off-by: Wei Xu <xuwei5@hisilicon.com>
---
drivers/misc/hisi_hikey_usb.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/misc/hisi_hikey_usb.c b/drivers/misc/hisi_hikey_usb.c
index 2ddd4072788d..5759e7209023 100644
--- a/drivers/misc/hisi_hikey_usb.c
+++ b/drivers/misc/hisi_hikey_usb.c
@@ -151,7 +151,6 @@ static int hisi_hikey_usb_parse_kirin970(struct platform_device *pdev,
struct hisi_hikey_usb *hisi_hikey_usb)
{
struct regulator *regulator;
- int ret;
regulator = devm_regulator_get(&pdev->dev, "hub-vdd");
if (IS_ERR(regulator)) {
@@ -172,7 +171,7 @@ static int hisi_hikey_usb_parse_kirin970(struct platform_device *pdev,
if (IS_ERR(hisi_hikey_usb->reset))
return PTR_ERR(hisi_hikey_usb->reset);
- return ret;
+ return 0;
}
static int hisi_hikey_usb_probe(struct platform_device *pdev)
--
2.8.1
next reply other threads:[~2020-09-15 3:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-15 3:01 Wei Xu [this message]
2020-09-15 15:18 ` [PATCH] misc: hisi_hikey_usb: fix the uninitialized ret kernel test robot
2020-09-15 15:18 ` [PATCH] misc: hisi_hikey_usb: fix ptr_ret.cocci warnings kernel test robot
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=1600138861-187291-1-git-send-email-xuwei5@hisilicon.com \
--to=xuwei5@hisilicon.com \
--cc=arnd@arndb.de \
--cc=gregkh@linuxfoundation.org \
--cc=huangdaode@hisilicon.com \
--cc=jinying@hisilicon.com \
--cc=john.garry@huawei.com \
--cc=john.stultz@linaro.org \
--cc=jonathan.cameron@huawei.com \
--cc=liguozhu@hisilicon.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=mchehab+huawei@kernel.org \
--cc=salil.mehta@huawei.com \
--cc=shameerali.kolothum.thodi@huawei.com \
--cc=shiju.jose@huawei.com \
--cc=tangkunshan@huawei.com \
--cc=zhangyi.ac@huawei.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.