提交 763e6366 编写于 作者: W Wei Yongjun 提交者: Tomi Valkeinen

video: ARM CLCD: fix return value check in versatile_clcd_init_panel()

In case of error, the function syscon_node_to_regmap() returns ERR_PTR()
and never returns NULL. The NULL test in the return value check should
be replaced with IS_ERR().

Fixes: 25348160 ("video: ARM CLCD: add special panel hook for Versatiles")
Signed-off-by: NWei Yongjun <weiyj.lk@gmail.com>
Reviewed-by: NLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
上级 1121a418
......@@ -528,9 +528,9 @@ int versatile_clcd_init_panel(struct clcd_fb *fb,
versatile_clcd_type = (enum versatile_clcd)clcd_id->data;
map = syscon_node_to_regmap(np);
if (!map) {
if (IS_ERR(map)) {
dev_err(dev, "no Versatile syscon regmap\n");
return -ENODEV;
return PTR_ERR(map);
}
switch (versatile_clcd_type) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册