提交 cf85d5ca 编写于 作者: C Christophe Lucas 提交者: Linus Torvalds

[PATCH] drivers/char/lcd.c: misc_register() can fail

Signed-off-by: NChristophe Lucas <clucas@rotomalug.org>
Signed-off-by: NDomen Puncer <domen@coderock.org>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 819a3eba
......@@ -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");*/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册