aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/hisi_hikey_usb.c
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2020-09-14 14:56:46 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-09-14 16:46:42 +0200
commit78ec034966b5b1879782903945fd5560c9d3b264 (patch)
treef407f2f50c03d23e980d679939c53bd91c9df7a0 /drivers/misc/hisi_hikey_usb.c
parentbbc11b34fa3dc3d9dc7b547141cdd765025567c3 (diff)
downloadlinux-78ec034966b5b1879782903945fd5560c9d3b264.tar.gz
misc: hisi_hikey_usb: fix return of uninitialized ret status variable
Currently the return value from ret is uninitialized so the function hisi_hikey_usb_parse_kirin970 is returning a garbage value when succeeding. Since ret is not used anywhere else in the function, remove it and just return 0 success at the end of the function. Fixes: d210a0023590 ("misc: hisi_hikey_usb: add support for Hikey 970") Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: Colin Ian King <colin.king@canonical.com> Link: https://lore.kernel.org/r/20200914135646.99334-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/hisi_hikey_usb.c')
-rw-r--r--drivers/misc/hisi_hikey_usb.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/misc/hisi_hikey_usb.c b/drivers/misc/hisi_hikey_usb.c
index 2ddd4072788d53..5759e72090237f 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)