Skip to content

Commit

Permalink
[PATCH] drivers/char/lcd.c: misc_register() can fail
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Christophe Lucas authored and Linus Torvalds committed Sep 10, 2005
1 parent 819a3eb commit cf85d5c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion drivers/char/lcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");*/
Expand Down

0 comments on commit cf85d5c

Please sign in to comment.