Message ID | 20210515030646.6877-1-thunder.leizhen@huawei.com |
---|---|
State | New |
Headers | show |
Series | [1/1] leds: as3645a: Fix error return code in as3645a_parse_node() | expand |
On Sat, May 15, 2021 at 11:06:46AM +0800, Zhen Lei wrote: > Return error code -ENODEV rather than '0' when the indicator node can not > be found. > > Fixes: a56ba8fbcb55 ("media: leds: as3645a: Add LED flash class driver") > Reported-by: Hulk Robot <hulkci@huawei.com> > Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> -- Sakari Ailus
On Sat 2021-05-15 11:06:46, Zhen Lei wrote: > Return error code -ENODEV rather than '0' when the indicator node can not > be found. > > Fixes: a56ba8fbcb55 ("media: leds: as3645a: Add LED flash class driver") > Reported-by: Hulk Robot <hulkci@huawei.com> > Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com> Thanks, applied. Pavel -- http://www.livejournal.com/~pavelmachek
diff --git a/drivers/leds/leds-as3645a.c b/drivers/leds/leds-as3645a.c index e8922fa03379620..80411d41e802d46 100644 --- a/drivers/leds/leds-as3645a.c +++ b/drivers/leds/leds-as3645a.c @@ -545,6 +545,7 @@ static int as3645a_parse_node(struct as3645a *flash, if (!flash->indicator_node) { dev_warn(&flash->client->dev, "can't find indicator node\n"); + rval = -ENODEV; goto out_err; }
Return error code -ENODEV rather than '0' when the indicator node can not be found. Fixes: a56ba8fbcb55 ("media: leds: as3645a: Add LED flash class driver") Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com> --- drivers/leds/leds-as3645a.c | 1 + 1 file changed, 1 insertion(+) -- 2.26.0.106.g9fadedd