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 <w.sang@pengutronix.de> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
This commit is contained in:
parent
e0785572ce
commit
d6372b706e
|
@ -347,6 +347,8 @@ static int __devexit tsc2007_remove(struct i2c_client *client)
|
||||||
struct tsc2007 *ts = i2c_get_clientdata(client);
|
struct tsc2007 *ts = i2c_get_clientdata(client);
|
||||||
struct tsc2007_platform_data *pdata = client->dev.platform_data;
|
struct tsc2007_platform_data *pdata = client->dev.platform_data;
|
||||||
|
|
||||||
|
i2c_set_clientdata(client, NULL);
|
||||||
|
|
||||||
tsc2007_free_irq(ts);
|
tsc2007_free_irq(ts);
|
||||||
|
|
||||||
if (pdata->exit_platform_hw)
|
if (pdata->exit_platform_hw)
|
||||||
|
|
Loading…
Reference in New Issue