staging: mfd: hi6421-spmi-pmic: fix error return code in hi6421_spmi_pmic_probe()
authorWang Hai <wanghai38@huawei.com>
Wed, 18 Nov 2020 10:37:24 +0000 (18:37 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 Dec 2020 10:53:19 +0000 (11:53 +0100)
commit0121a853eaced609813886b0d523968325b970dc
tree8edf8d55679fe7e287595717be8ead956a1df6b5
parent47324dbd56807af02febeff1bed48748bfce4dca
staging: mfd: hi6421-spmi-pmic: fix error return code in hi6421_spmi_pmic_probe()

[ Upstream commit ba3e4a2a0b3c639d3835f2f1dce27d79576ae453 ]

Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

Fixes: 4524ac56cdca ("staging: mfd: add a PMIC driver for HiSilicon 6421 SPMI version")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wang Hai <wanghai38@huawei.com>
Link: https://lore.kernel.org/r/20201118103724.57451-1-wanghai38@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/staging/hikey9xx/hi6421-spmi-pmic.c