summaryrefslogtreecommitdiffstats
path: root/drivers/video/backlight/backlight.c
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2006-03-10 02:33:36 +0100
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-10 04:47:37 +0100
commit10ad1b7363090c0eec2b4054a5a3b82d2cc09ee5 (patch)
tree7e0b92fd8fc084311c8e1bec93484ecacfc99a75 /drivers/video/backlight/backlight.c
parent[PATCH] dcdbas: dcdbas_pdev referenced after platform_device_unregister on exit (diff)
downloadlinux-10ad1b7363090c0eec2b4054a5a3b82d2cc09ee5.tar.xz
linux-10ad1b7363090c0eec2b4054a5a3b82d2cc09ee5.zip
[PATCH] Fix error handling in backlight drivers
ERR_PTR() is supposed to be passed a negative value. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/video/backlight/backlight.c')
-rw-r--r--drivers/video/backlight/backlight.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/video/backlight/backlight.c b/drivers/video/backlight/backlight.c
index bd39bbd88d41..151fda8dded0 100644
--- a/drivers/video/backlight/backlight.c
+++ b/drivers/video/backlight/backlight.c
@@ -172,7 +172,7 @@ struct backlight_device *backlight_device_register(const char *name, void *devda
new_bd = kmalloc(sizeof(struct backlight_device), GFP_KERNEL);
if (unlikely(!new_bd))
- return ERR_PTR(ENOMEM);
+ return ERR_PTR(-ENOMEM);
init_MUTEX(&new_bd->sem);
new_bd->props = bp;