[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1600138861-187291-1-git-send-email-xuwei5@hisilicon.com>
Date: Tue, 15 Sep 2020 11:01:01 +0800
From: Wei Xu <xuwei5@...ilicon.com>
To: <mchehab+huawei@...nel.org>
CC: <xuwei5@...ilicon.com>, <linuxarm@...wei.com>,
<shameerali.kolothum.thodi@...wei.com>,
<jonathan.cameron@...wei.com>, <john.garry@...wei.com>,
<salil.mehta@...wei.com>, <shiju.jose@...wei.com>,
<jinying@...ilicon.com>, <zhangyi.ac@...wei.com>,
<liguozhu@...ilicon.com>, <tangkunshan@...wei.com>,
<huangdaode@...ilicon.com>, John Stultz <john.stultz@...aro.org>,
Arnd Bergmann <arnd@...db.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
<linux-kernel@...r.kernel.org>
Subject: [PATCH] misc: hisi_hikey_usb: fix the uninitialized ret
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@...ilicon.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
Powered by blists - more mailing lists