From: Geert Uytterhoeven Date: Mon, 15 Oct 2007 19:51:10 +0000 (+0200) Subject: Atari keyboard: incorporate additional review comments X-Git-Tag: v2.6.24-rc1~1282 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=63bd8c48e04bbbc9cee3d752857914609d8d406f;p=linux-2.6 Atari keyboard: incorporate additional review comments Atari keyboard: incorporate additional review comments: o Kill reference to source file name o Return error value from input_register_device() instead of -ENOMEM Signed-off-by: Geert Uytterhoeven Cc: Dmitry Torokhov Cc: Michael Schmitz Signed-off-by: Linus Torvalds --- diff --git a/arch/m68k/atari/atakeyb.c b/arch/m68k/atari/atakeyb.c index fbbccb5e75..880add120e 100644 --- a/arch/m68k/atari/atakeyb.c +++ b/arch/m68k/atari/atakeyb.c @@ -1,6 +1,4 @@ /* - * linux/arch/m68k/atari/atakeyb.c - * * Atari Keyboard driver for 680x0 Linux * * This file is subject to the terms and conditions of the GNU General Public diff --git a/drivers/input/keyboard/atakbd.c b/drivers/input/keyboard/atakbd.c index f948d3a14a..a1800151b6 100644 --- a/drivers/input/keyboard/atakbd.c +++ b/drivers/input/keyboard/atakbd.c @@ -217,7 +217,7 @@ static void atakbd_interrupt(unsigned char scancode, char down) static int __init atakbd_init(void) { - int i; + int i, error; if (!MACH_IS_ATARI || !ATARIHW_PRESENT(ST_MFP)) return -EIO; @@ -247,9 +247,10 @@ static int __init atakbd_init(void) } /* error check */ - if (input_register_device(atakbd_dev)) { + error = input_register_device(atakbd_dev); + if (error) { input_free_device(atakbd_dev); - return -ENOMEM; + return error; } atari_input_keyboard_interrupt_hook = atakbd_interrupt;