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>
This commit is contained in:
Dan Carpenter 2011-03-21 15:03:13 +00:00 committed by Paul Mundt
parent e0998eab67
commit beee1f20a1

View File

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