From: Wolfram Sang Date: Mon, 22 Mar 2010 05:31:26 +0000 (-0700) Subject: Input: tsc2007 - do not leave dangling clientdata pointer X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d6372b706e83817dfa6c9326d1054b9b95a7de2a;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git 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 --- 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)