projects
/
platform
/
kernel
/
linux-exynos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e0998ea
)
fbdev: sh_mobile_lcdc: checking NULL instead of IS_ERR()
author
Dan Carpenter
<error27@gmail.com>
Mon, 21 Mar 2011 15:03:13 +0000
(15:03 +0000)
committer
Paul Mundt
<lethal@linux-sh.org>
Tue, 22 Mar 2011 07:08:48 +0000
(16:08 +0900)
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>
drivers/video/sh_mobile_lcdcfb.c
patch
|
blob
|
history
diff --git
a/drivers/video/sh_mobile_lcdcfb.c
b/drivers/video/sh_mobile_lcdcfb.c
index
bf2629f
..
757665b
100644
(file)
--- 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;
}