projects
/
GitHub
/
MotorolaMobilityLLC
/
kernel-slsi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b1cdc46
)
backlight: backlight_device_register() return ERR_PTR()
author
Dan Carpenter
<error27@gmail.com>
Tue, 23 Mar 2010 00:51:36 +0000
(20:51 -0400)
committer
Richard Purdie
<rpurdie@linux.intel.com>
Wed, 26 May 2010 12:08:31 +0000
(13:08 +0100)
backlight_device_register() returns a valid pointer or ERR_PTR() never
NULL.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
drivers/video/backlight/adx_bl.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/video/backlight/adx_bl.c
b/drivers/video/backlight/adx_bl.c
index 7f4a7c30a98b1f3a09fd020c4c5906f386a1015c..fe9af129c5dd1cb969ea0e0cf418a7b66d5db3b2 100644
(file)
--- a/
drivers/video/backlight/adx_bl.c
+++ b/
drivers/video/backlight/adx_bl.c
@@
-107,8
+107,8
@@
static int __devinit adx_backlight_probe(struct platform_device *pdev)
props.max_brightness = 0xff;
bldev = backlight_device_register(dev_name(&pdev->dev), &pdev->dev,
bl, &adx_backlight_ops, &props);
- if (
!bldev
) {
- ret =
-ENOMEM
;
+ if (
IS_ERR(bldev)
) {
+ ret =
PTR_ERR(bldev)
;
goto out;
}