From: Dan Carpenter Date: Mon, 21 Mar 2011 15:03:13 +0000 (+0000) Subject: fbdev: sh_mobile_lcdc: checking NULL instead of IS_ERR() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=beee1f20a185c7e79fd33bb83e04fe44ecd75af3;p=linux-beck.git fbdev: sh_mobile_lcdc: checking NULL instead of IS_ERR() backlight_device_register() returns an ERR_PTR. It doesn't return NULL. Signed-off-by: Dan Carpenter Signed-off-by: Paul Mundt --- diff --git a/drivers/video/sh_mobile_lcdcfb.c b/drivers/video/sh_mobile_lcdcfb.c index bf2629f83f40..757665bc500f 100644 --- a/drivers/video/sh_mobile_lcdcfb.c +++ b/drivers/video/sh_mobile_lcdcfb.c @@ -1088,8 +1088,9 @@ 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) { - dev_err(parent, "unable to register backlight device\n"); + if (IS_ERR(bl)) { + dev_err(parent, "unable to register backlight device: %ld\n", + PTR_ERR(bl)); return NULL; }