From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-input@vger.kernel.org, linux-m68k@lists.linux-m68k.org,
linux-kernel@vger.kernel.org,
Michael Schmitz <schmitz@biophys.uni-duesseldorf.de>,
Michael Schmitz <schmitz@debian.org>,
Geert Uytterhoeven <geert@linux-m68k.org>
Subject: [PATCH 2/3] input/atari: Fix atarimouse init
Date: Sun, 8 May 2011 11:17:26 +0200 [thread overview]
Message-ID: <1304846247-12401-3-git-send-email-geert@linux-m68k.org> (raw)
In-Reply-To: <1304846247-12401-1-git-send-email-geert@linux-m68k.org>
From: Michael Schmitz <schmitz@biophys.uni-duesseldorf.de>
Atarimouse fails to load as a module (with ENODEV), due to a brown paper
bag bug, misinterpreting the semantics of atari_keyb_init().
[geert] Propagate the return value of atari_keyb_init() everywhere
Signed-off-by: Michael Schmitz <schmitz@debian.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
drivers/input/keyboard/atakbd.c | 5 +++--
drivers/input/mouse/atarimouse.c | 5 +++--
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/input/keyboard/atakbd.c b/drivers/input/keyboard/atakbd.c
index 1839194..10bcd4a 100644
--- a/drivers/input/keyboard/atakbd.c
+++ b/drivers/input/keyboard/atakbd.c
@@ -223,8 +223,9 @@ static int __init atakbd_init(void)
return -ENODEV;
// need to init core driver if not already done so
- if (atari_keyb_init())
- return -ENODEV;
+ error = atari_keyb_init();
+ if (error)
+ return error;
atakbd_dev = input_allocate_device();
if (!atakbd_dev)
diff --git a/drivers/input/mouse/atarimouse.c b/drivers/input/mouse/atarimouse.c
index a57143c..16a9d0f 100644
--- a/drivers/input/mouse/atarimouse.c
+++ b/drivers/input/mouse/atarimouse.c
@@ -118,8 +118,9 @@ static int __init atamouse_init(void)
if (!MACH_IS_ATARI || !ATARIHW_PRESENT(ST_MFP))
return -ENODEV;
- if (!atari_keyb_init())
- return -ENODEV;
+ error = atari_keyb_init();
+ if (error)
+ return error;
atamouse_dev = input_allocate_device();
if (!atamouse_dev)
--
1.7.0.4
next prev parent reply other threads:[~2011-05-08 9:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1304846247-12401-1-git-send-email-geert@linux-m68k.org>
2011-05-08 9:17 ` [PATCH 1/3] input/atari: Use the correct mouse interrupt hook Geert Uytterhoeven
2011-05-08 9:17 ` Geert Uytterhoeven [this message]
2011-05-08 9:17 ` [PATCH 3/3] input/atari: Fix mouse movement and button mapping Geert Uytterhoeven
2011-05-09 6:00 ` [PATCH 0/3] Atari input patches Dmitry Torokhov
[not found] ` <20110509060048.GA27577@core.coreip.homeip.net>
2011-05-09 7:10 ` Geert Uytterhoeven
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1304846247-12401-3-git-send-email-geert@linux-m68k.org \
--to=geert@linux-m68k.org \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@lists.linux-m68k.org \
--cc=schmitz@biophys.uni-duesseldorf.de \
--cc=schmitz@debian.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox