diff mbox

fbdev: sh_mobile_lcdc: checking NULL instead of IS_ERR()

Message ID 20110319043647.GZ2008@bicker (mailing list archive)
State Superseded
Headers show

Commit Message

Dan Carpenter March 19, 2011, 4:36 a.m. UTC
None
diff mbox

Patch

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;
 	}