summaryrefslogtreecommitdiff
path: root/drivers/char/lcd.c
diff options
context:
space:
mode:
authorChristophe Lucas <clucas@rotomalug.org>2005-09-10 11:26:32 +0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-10 21:06:25 +0400
commitcf85d5ca880c9611906e0ca0c729fdf01c724501 (patch)
tree8ce7ebe016ba887aad3e84e6ce0b6dfdaf21b6b1 /drivers/char/lcd.c
parent819a3eba4233ffc6c125e1bf0a15ae093b97c3a6 (diff)
downloadlinux-cf85d5ca880c9611906e0ca0c729fdf01c724501.tar.xz
[PATCH] drivers/char/lcd.c: misc_register() can fail
Signed-off-by: Christophe Lucas <clucas@rotomalug.org> Signed-off-by: Domen Puncer <domen@coderock.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/char/lcd.c')
-rw-r--r--drivers/char/lcd.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/char/lcd.c b/drivers/char/lcd.c
index cf01a720eb2e..b77161146144 100644
--- a/drivers/char/lcd.c
+++ b/drivers/char/lcd.c
@@ -613,10 +613,15 @@ static struct miscdevice lcd_dev = {
static int lcd_init(void)
{
+ int ret;
unsigned long data;
pr_info("%s\n", LCD_DRIVER);
- misc_register(&lcd_dev);
+ ret = misc_register(&lcd_dev);
+ if (ret) {
+ printk(KERN_WARNING LCD "Unable to register misc device.\n");
+ return ret;
+ }
/* Check region? Naaah! Just snarf it up. */
/* request_region(RTC_PORT(0), RTC_IO_EXTENT, "lcd");*/