linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] fbdev: sh_mobile_lcdc: checking NULL instead of IS_ERR()
@ 2011-03-19  4:36 Dan Carpenter
  2011-03-21  4:29 ` Janorkar, Mayuresh
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Dan Carpenter @ 2011-03-19  4:36 UTC (permalink / raw)
  To: linux-fbdev

backlight_device_register() returns an ERR_PTR.  It doesn't return NULL.

Signed-off-by: Dan Carpenter <error27@gmail.com>

diff --git a/drivers/video/sh_mobile_lcdcfb.c b/drivers/video/sh_mobile_lcdcfb.c
index bf2629f..a53abe1 100644
--- a/drivers/video/sh_mobile_lcdcfb.c
+++ b/drivers/video/sh_mobile_lcdcfb.c
@@ -1088,7 +1088,7 @@ static struct backlight_device *sh_mobile_lcdc_bl_probe(struct device *parent,
 
 	bl = backlight_device_register(ch->cfg.bl_info.name, parent, ch,
 				       &sh_mobile_lcdc_bl_ops, NULL);
-	if (!bl) {
+	if (IS_ERR(bl)) {
 		dev_err(parent, "unable to register backlight device\n");
 		return NULL;
 	}

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

end of thread, other threads:[~2011-03-21  5:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-19  4:36 [patch] fbdev: sh_mobile_lcdc: checking NULL instead of IS_ERR() Dan Carpenter
2011-03-21  4:29 ` Janorkar, Mayuresh
2011-03-21  4:39 ` [patch] fbdev: sh_mobile_lcdc: checking NULL instead of Dan Carpenter
2011-03-21  5:43 ` [patch] fbdev: sh_mobile_lcdc: checking NULL instead of IS_ERR() Janorkar, Mayuresh

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