提交 96a30960 编写于 作者: Z Zhen Lei 提交者: Pavel Machek

leds: as3645a: Fix error return code in as3645a_parse_node()

Return error code -ENODEV rather than '0' when the indicator node can not
be found.

Fixes: a56ba8fb ("media: leds: as3645a: Add LED flash class driver")
Reported-by: NHulk Robot <hulkci@huawei.com>
Acked-by: NSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: NZhen Lei <thunder.leizhen@huawei.com>
Signed-off-by: NPavel Machek <pavel@ucw.cz>
上级 9d0150db
...@@ -545,6 +545,7 @@ static int as3645a_parse_node(struct as3645a *flash, ...@@ -545,6 +545,7 @@ static int as3645a_parse_node(struct as3645a *flash,
if (!flash->indicator_node) { if (!flash->indicator_node) {
dev_warn(&flash->client->dev, dev_warn(&flash->client->dev,
"can't find indicator node\n"); "can't find indicator node\n");
rval = -ENODEV;
goto out_err; goto out_err;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册