提交 beee1f20 编写于 作者: D Dan Carpenter 提交者: Paul Mundt

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: NDan Carpenter <error27@gmail.com>
Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
上级 e0998eab
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册