input: kxtj9: fix bug in probe()

Started by Dan Carpenter on Jul 20, 2011

Subsystems (2)

Maintainers (2)

DORMANTno replies

open the first message on its own page

Message details and related content
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 <redacted>
---
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;
 	}
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help