From: Christophe Lucas Date: Sat, 10 Sep 2005 07:26:32 +0000 (-0700) Subject: [PATCH] drivers/char/lcd.c: misc_register() can fail X-Git-Tag: v2.6.14-rc1~205 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cf85d5ca880c9611906e0ca0c729fdf01c724501;p=linux-2.6 [PATCH] drivers/char/lcd.c: misc_register() can fail Signed-off-by: Christophe Lucas Signed-off-by: Domen Puncer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/char/lcd.c b/drivers/char/lcd.c index cf01a720eb..b771611461 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");*/