summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Lucas <clucas@rotomalug.org>2005-09-10 00:26:32 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-10 10:06:25 -0700
commitcf85d5ca880c9611906e0ca0c729fdf01c724501 (patch)
tree8ce7ebe016ba887aad3e84e6ce0b6dfdaf21b6b1
parent819a3eba4233ffc6c125e1bf0a15ae093b97c3a6 (diff)
[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>
-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 cf01a720eb2..b7716114614 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");*/