summaryrefslogtreecommitdiff
path: root/drivers/video
diff options
context:
space:
mode:
authorWei Yongjun <weiyj.lk@gmail.com>2016-08-13 04:26:26 +0300
committerTomi Valkeinen <tomi.valkeinen@ti.com>2016-08-30 11:36:58 +0300
commit763e6366f3700e2f34a94e71bfec67dea7e37b68 (patch)
tree9fc04d926ce0ff4e29adfe7fe50ba0a5e13c48a6 /drivers/video
parent1121a418b2083038e9981ab9e2401db9fb8fdd7e (diff)
downloadlinux-763e6366f3700e2f34a94e71bfec67dea7e37b68.tar.xz
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: 25348160e9a4 ("video: ARM CLCD: add special panel hook for Versatiles") Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/fbdev/amba-clcd-versatile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/video/fbdev/amba-clcd-versatile.c b/drivers/video/fbdev/amba-clcd-versatile.c
index 9a90817b1550..56161f98ad7e 100644
--- a/drivers/video/fbdev/amba-clcd-versatile.c
+++ b/drivers/video/fbdev/amba-clcd-versatile.c
@@ -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) {