Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

staging: mfd: hi6421-spmi-pmic: fix error return code in hi6421_spmi_pmic_probe()

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>

authored by

Wang Hai and committed by
Greg Kroah-Hartman
ba3e4a2a 1f59b066

+3 -1
+3 -1
drivers/staging/hikey9xx/hi6421-spmi-pmic.c
··· 262 262 hi6421_spmi_pmic_irq_prc(pmic); 263 263 264 264 pmic->irqs = devm_kzalloc(dev, HISI_IRQ_NUM * sizeof(int), GFP_KERNEL); 265 - if (!pmic->irqs) 265 + if (!pmic->irqs) { 266 + ret = -ENOMEM; 266 267 goto irq_malloc; 268 + } 267 269 268 270 pmic->domain = irq_domain_add_simple(np, HISI_IRQ_NUM, 0, 269 271 &hi6421_spmi_domain_ops, pmic);