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:
Wolfram Sang 2010-03-21 22:31:26 -07:00 committed by Dmitry Torokhov
parent e0785572ce
commit d6372b706e
1 changed files with 2 additions and 0 deletions

View File

@ -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)