aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2006-03-09 20:33:36 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-09 22:47:37 -0500
commit10ad1b7363090c0eec2b4054a5a3b82d2cc09ee5 (patch)
tree7e0b92fd8fc084311c8e1bec93484ecacfc99a75 /drivers/video
parent435a80f610b2ac38a4b5334a7ae22672de3f06bd (diff)
[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')
-rw-r--r--drivers/video/backlight/backlight.c2
-rw-r--r--drivers/video/backlight/lcd.c2
2 files changed, 2 insertions, 2 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
172 172
173 new_bd = kmalloc(sizeof(struct backlight_device), GFP_KERNEL); 173 new_bd = kmalloc(sizeof(struct backlight_device), GFP_KERNEL);
174 if (unlikely(!new_bd)) 174 if (unlikely(!new_bd))
175 return ERR_PTR(ENOMEM); 175 return ERR_PTR(-ENOMEM);
176 176
177 init_MUTEX(&new_bd->sem); 177 init_MUTEX(&new_bd->sem);
178 new_bd->props = bp; 178 new_bd->props = bp;
diff --git a/drivers/video/backlight/lcd.c b/drivers/video/backlight/lcd.c
index 9e32485ee7bb..86908a60c630 100644
--- a/drivers/video/backlight/lcd.c
+++ b/drivers/video/backlight/lcd.c
@@ -171,7 +171,7 @@ struct lcd_device *lcd_device_register(const char *name, void *devdata,
171 171
172 new_ld = kmalloc(sizeof(struct lcd_device), GFP_KERNEL); 172 new_ld = kmalloc(sizeof(struct lcd_device), GFP_KERNEL);
173 if (unlikely(!new_ld)) 173 if (unlikely(!new_ld))
174 return ERR_PTR(ENOMEM); 174 return ERR_PTR(-ENOMEM);
175 175
176 init_MUTEX(&new_ld->sem); 176 init_MUTEX(&new_ld->sem);
177 new_ld->props = lp; 177 new_ld->props = lp;