]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
leds: is31fl32xx: Fix missing error code in is31fl32xx_parse_dt()
authorJiapeng Chong <jiapeng.chong@linux.alibaba.com>
Tue, 1 Jun 2021 11:09:03 +0000 (19:09 +0800)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 15 Oct 2021 09:26:39 +0000 (11:26 +0200)
BugLink: https://bugs.launchpad.net/bugs/1946788
[ Upstream commit e642197562cd9781453f835e1406cfe0feeb917e ]

The error code is missing in this code scenario, add the error code
'-EINVAL' to the return value 'ret'.

Eliminate the follow smatch warning:

drivers/leds/leds-is31fl32xx.c:388 is31fl32xx_parse_dt() warn: missing
error code 'ret'.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Fixes: 9d7cffaf99f5 ("leds: Add driver for the ISSI IS31FL32xx family of LED controllers")
Acked-by: David Rivshin <drivshin@allworx.com>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
drivers/leds/leds-is31fl32xx.c

index 2180255ad339336b828b726c46c25815b59d0125..899ed94b668767b1ef0a280957d83bce532f0882 100644 (file)
@@ -385,6 +385,7 @@ static int is31fl32xx_parse_dt(struct device *dev,
                        dev_err(dev,
                                "Node %pOF 'reg' conflicts with another LED\n",
                                child);
+                       ret = -EINVAL;
                        goto err;
                }