From: Dan Carpenter <error27@gmail.com>
To: Chris Hudson <chudson@kionix.com>
Cc: Dmitry Torokhov <dtor@mail.ru>, linux-input@vger.kernel.org
Subject: [patch 1/2] input: kxtj9: fix bug in probe()
Date: Wed, 20 Jul 2011 08:30:41 +0300 [thread overview]
Message-ID: <20110720053041.GD6445@shale.localdomain> (raw)
We are testing the wrong variable here. I believe tj9->input_dev
is always NULL at this point, so probe() will fail.
Signed-off-by: Dan Carpenter <error27@gmail.com>
---
Compile tested.
diff --git a/drivers/input/misc/kxtj9.c b/drivers/input/misc/kxtj9.c
index a416f7f..6c96dc3 100644
--- a/drivers/input/misc/kxtj9.c
+++ b/drivers/input/misc/kxtj9.c
@@ -301,7 +301,7 @@ static int __devinit kxtj9_setup_input_device(struct kxtj9_data *tj9)
int err;
input_dev = input_allocate_device();
- if (!tj9->input_dev) {
+ if (!input_dev) {
dev_err(&tj9->client->dev, "input device allocate failed\n");
return -ENOMEM;
}
reply other threads:[~2011-07-20 5:32 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20110720053041.GD6445@shale.localdomain \
--to=error27@gmail.com \
--cc=chudson@kionix.com \
--cc=dtor@mail.ru \
--cc=linux-input@vger.kernel.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