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-Url: https://git.stricted.de/?a=commitdiff_plain;h=cf85d5ca880c9611906e0ca0c729fdf01c724501;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [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 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");*/