* [PATCH] leds: is31fl32xx: Fix missing error code in is31fl32xx_parse_dt()
@ 2021-06-01 11:09 Jiapeng Chong
2021-06-03 21:10 ` David Rivshin
0 siblings, 1 reply; 3+ messages in thread
From: Jiapeng Chong @ 2021-06-01 11:09 UTC (permalink / raw)
To: pavel; +Cc: linux-leds, linux-kernel, Jiapeng Chong
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>
---
drivers/leds/leds-is31fl32xx.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/leds/leds-is31fl32xx.c b/drivers/leds/leds-is31fl32xx.c
index 2180255..899ed94 100644
--- a/drivers/leds/leds-is31fl32xx.c
+++ b/drivers/leds/leds-is31fl32xx.c
@@ -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;
}
--
1.8.3.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] leds: is31fl32xx: Fix missing error code in is31fl32xx_parse_dt()
2021-06-01 11:09 [PATCH] leds: is31fl32xx: Fix missing error code in is31fl32xx_parse_dt() Jiapeng Chong
@ 2021-06-03 21:10 ` David Rivshin
2021-07-03 20:19 ` Pavel Machek
0 siblings, 1 reply; 3+ messages in thread
From: David Rivshin @ 2021-06-03 21:10 UTC (permalink / raw)
To: Jiapeng Chong; +Cc: pavel, linux-leds, linux-kernel
On Tue, 1 Jun 2021 19:09:03 +0800
Jiapeng Chong <jiapeng.chong@linux.alibaba.com> wrote:
> 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>
Good catch!
Acked-by: David Rivshin <drivshin@allworx.com>
You might also want to add a:
Fixes: 9d7cffaf99f5 ("leds: Add driver for the ISSI IS31FL32xx family of LED controllers")
> ---
> drivers/leds/leds-is31fl32xx.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/leds/leds-is31fl32xx.c b/drivers/leds/leds-is31fl32xx.c
> index 2180255..899ed94 100644
> --- a/drivers/leds/leds-is31fl32xx.c
> +++ b/drivers/leds/leds-is31fl32xx.c
> @@ -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;
> }
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] leds: is31fl32xx: Fix missing error code in is31fl32xx_parse_dt()
2021-06-03 21:10 ` David Rivshin
@ 2021-07-03 20:19 ` Pavel Machek
0 siblings, 0 replies; 3+ messages in thread
From: Pavel Machek @ 2021-07-03 20:19 UTC (permalink / raw)
To: David Rivshin; +Cc: Jiapeng Chong, linux-leds, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 935 bytes --]
On Thu 2021-06-03 17:10:10, David Rivshin wrote:
> On Tue, 1 Jun 2021 19:09:03 +0800
> Jiapeng Chong <jiapeng.chong@linux.alibaba.com> wrote:
>
> > 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>
>
> Good catch!
>
> Acked-by: David Rivshin <drivshin@allworx.com>
>
> You might also want to add a:
>
> Fixes: 9d7cffaf99f5 ("leds: Add driver for the ISSI IS31FL32xx family of LED controllers")
>
Thanks, applied. I added the fixes tag, too, but I'm not sure if this
is suitable for stable.
Best regards,
Pavel
--
http://www.livejournal.com/~pavelmachek
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-07-03 20:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-01 11:09 [PATCH] leds: is31fl32xx: Fix missing error code in is31fl32xx_parse_dt() Jiapeng Chong
2021-06-03 21:10 ` David Rivshin
2021-07-03 20:19 ` Pavel Machek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).