linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] INPUT: tps6507x-ts, remove unneeded NULL test
@ 2010-06-22 11:41 Jiri Slaby
  2010-06-23  6:23 ` Dmitry Torokhov
  0 siblings, 1 reply; 2+ messages in thread
From: Jiri Slaby @ 2010-06-22 11:41 UTC (permalink / raw)
  To: dmitry.torokhov
  Cc: linux-kernel, jirislaby, Jiri Slaby, Todd Fischer, Samuel Ortiz,
	linux-input

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 <jslaby@suse.cz>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Todd Fischer <todd.fischer@ridgerun.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>
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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] INPUT: tps6507x-ts, remove unneeded NULL test
  2010-06-22 11:41 [PATCH] INPUT: tps6507x-ts, remove unneeded NULL test Jiri Slaby
@ 2010-06-23  6:23 ` Dmitry Torokhov
  0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Torokhov @ 2010-06-23  6:23 UTC (permalink / raw)
  To: Jiri Slaby
  Cc: linux-kernel, jirislaby, Todd Fischer, Samuel Ortiz, linux-input

On Tue, Jun 22, 2010 at 01:41:02PM +0200, Jiri Slaby wrote:
> 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 <jslaby@suse.cz>
> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> Cc: Todd Fischer <todd.fischer@ridgerun.com>
> Cc: Samuel Ortiz <sameo@linux.intel.com>
> Cc: linux-input@vger.kernel.org

Applied, thanks Jiri.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-06-23  6:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-22 11:41 [PATCH] INPUT: tps6507x-ts, remove unneeded NULL test Jiri Slaby
2010-06-23  6:23 ` Dmitry Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).