summaryrefslogtreecommitdiffstats
path: root/drivers/video/sh_mobile_lcdcfb.c
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2011-03-21 16:03:13 +0100
committerPaul Mundt <lethal@linux-sh.org>2011-03-22 08:08:48 +0100
commitbeee1f20a185c7e79fd33bb83e04fe44ecd75af3 (patch)
treef7c9972b12bbcde5f2de7306494a4ada042e94ad /drivers/video/sh_mobile_lcdcfb.c
parentvideo: sh7760fb: use resource_size() (diff)
downloadlinux-beee1f20a185c7e79fd33bb83e04fe44ecd75af3.tar.xz
linux-beee1f20a185c7e79fd33bb83e04fe44ecd75af3.zip
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 <error27@gmail.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'drivers/video/sh_mobile_lcdcfb.c')
-rw-r--r--drivers/video/sh_mobile_lcdcfb.c5
1 files changed, 3 insertions, 2 deletions
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;
}