From: Jiri Slaby Date: Tue, 22 Jun 2010 18:25:03 +0000 (-0700) Subject: Input: tps6507x-ts - remove unneeded NULL test X-Git-Tag: v2.6.36-rc1~581^2^2~52 X-Git-Url: http://bbs.cooldavid.org/git/?a=commitdiff_plain;h=4aaf504670e38da9cb929988cdce05648fa635a7;p=net-next-2.6.git Input: tps6507x-ts - remove unneeded NULL test Stanse found that tsc is dereferenced earlier than checked for being NULL in tps6507x_ts_remove. Remove the test because there is no way for tsc to be NULL there. Signed-off-by: Jiri Slaby Signed-off-by: Dmitry Torokhov --- diff --git a/drivers/input/touchscreen/tps6507x-ts.c b/drivers/input/touchscreen/tps6507x-ts.c index 5b70a1419b4..a644d18c04d 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);