Thread (2 messages) 2 messages, 2 authors, 2010-06-23
STALE5820d

[PATCH] INPUT: tps6507x-ts, remove unneeded NULL test

From: Jiri Slaby <hidden>
Date: 2010-06-22 11:41:05
Also in: lkml
Subsystem: input (keyboard, mouse, joystick, touchscreen) drivers, the rest · Maintainers: Dmitry Torokhov, Linus Torvalds

Stanse found that tsc is dereferenced earlier than checked for being
NULL in tps6507x_ts_remove. Remove the test because I see no way, how
tsc can be NULL there.

Signed-off-by: Jiri Slaby <redacted>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Todd Fischer <redacted>
Cc: Samuel Ortiz <redacted>
Cc: linux-input@vger.kernel.org
---
 drivers/input/touchscreen/tps6507x-ts.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)
diff --git a/drivers/input/touchscreen/tps6507x-ts.c b/drivers/input/touchscreen/tps6507x-ts.c
index 5b70a14..a644d18 100644
--- a/drivers/input/touchscreen/tps6507x-ts.c
+++ b/drivers/input/touchscreen/tps6507x-ts.c
@@ -355,9 +355,6 @@ static int __devexit tps6507x_ts_remove(struct platform_device *pdev)
 	struct tps6507x_ts *tsc = tps6507x_dev->ts;
 	struct input_dev *input_dev = tsc->input_dev;
 
-	if (!tsc)
-		return 0;
-
 	cancel_delayed_work_sync(&tsc->work);
 	destroy_workqueue(tsc->wq);
 
-- 
1.7.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help