mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 01:49:46 +00:00
staging: mfd: hi6421-spmi-pmic: fix error return code in hi6421_spmi_pmic_probe()
[ Upstream commitba3e4a2a0b] Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes:4524ac56cd("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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
47324dbd56
commit
0121a853ea
@@ -262,8 +262,10 @@ static int hi6421_spmi_pmic_probe(struct spmi_device *pdev)
|
||||
hi6421_spmi_pmic_irq_prc(pmic);
|
||||
|
||||
pmic->irqs = devm_kzalloc(dev, HISI_IRQ_NUM * sizeof(int), GFP_KERNEL);
|
||||
if (!pmic->irqs)
|
||||
if (!pmic->irqs) {
|
||||
ret = -ENOMEM;
|
||||
goto irq_malloc;
|
||||
}
|
||||
|
||||
pmic->domain = irq_domain_add_simple(np, HISI_IRQ_NUM, 0,
|
||||
&hi6421_spmi_domain_ops, pmic);
|
||||
|
||||
Reference in New Issue
Block a user