From d6372b706e83817dfa6c9326d1054b9b95a7de2a Mon Sep 17 00:00:00 2001 From: Wolfram Sang Date: Sun, 21 Mar 2010 22:31:26 -0700 Subject: [PATCH] Input: tsc2007 - do not leave dangling clientdata pointer Do not leave dangling client data pointers when unbinding device from the driver. Signed-off-by: Wolfram Sang Signed-off-by: Dmitry Torokhov --- drivers/input/touchscreen/tsc2007.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/input/touchscreen/tsc2007.c b/drivers/input/touchscreen/tsc2007.c index be23780e8a3e..769b479fcaa6 100644 --- a/drivers/input/touchscreen/tsc2007.c +++ b/drivers/input/touchscreen/tsc2007.c @@ -347,6 +347,8 @@ static int __devexit tsc2007_remove(struct i2c_client *client) struct tsc2007 *ts = i2c_get_clientdata(client); struct tsc2007_platform_data *pdata = client->dev.platform_data; + i2c_set_clientdata(client, NULL); + tsc2007_free_irq(ts); if (pdata->exit_platform_hw) -- 2.20.1