linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] video: ARM CLCD: fix return value check in versatile_clcd_init_panel()
@ 2016-08-13  1:26 Wei Yongjun
  2016-08-19  9:07 ` Linus Walleij
  2016-08-30  8:37 ` Tomi Valkeinen
  0 siblings, 2 replies; 3+ messages in thread
From: Wei Yongjun @ 2016-08-13  1:26 UTC (permalink / raw)
  To: linux-fbdev

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>
---
 drivers/video/fbdev/amba-clcd-versatile.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/video/fbdev/amba-clcd-versatile.c b/drivers/video/fbdev/amba-clcd-versatile.c
index 9a90817..56161f9 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) {


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-08-30  8:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-13  1:26 [PATCH -next] video: ARM CLCD: fix return value check in versatile_clcd_init_panel() Wei Yongjun
2016-08-19  9:07 ` Linus Walleij
2016-08-30  8:37 ` Tomi Valkeinen

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).