Commit 78ec0349 authored by Colin Ian King's avatar Colin Ian King Committed by Greg Kroah-Hartman

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: d210a002 ("misc: hisi_hikey_usb: add support for Hikey 970")
Reviewed-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20200914135646.99334-1-colin.king@canonical.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent bbc11b34
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment