diff options
author | Wolfram Sang <w.sang@pengutronix.de> | 2010-03-20 10:12:54 -0400 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2010-05-27 19:37:28 -0400 |
commit | f322d5f0097333343bfd92b47258ee997c889263 (patch) | |
tree | d6f0d4b0e0f6e6a8fa778a73c740916ca5616dd2 /drivers/mfd/tps65010.c | |
parent | d84027bc4d176a0c06e8f62a9f7a002bdd444012 (diff) |
mfd: Fix dangling pointers
Fix I2C-drivers which missed setting clientdata to NULL before freeing the
structure it points to. Also fix drivers which do this _after_ the structure
was freed already.
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/tps65010.c')
-rw-r--r-- | drivers/mfd/tps65010.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mfd/tps65010.c b/drivers/mfd/tps65010.c index e5955306c2fa..9b22a77f70f5 100644 --- a/drivers/mfd/tps65010.c +++ b/drivers/mfd/tps65010.c | |||
@@ -530,8 +530,8 @@ static int __exit tps65010_remove(struct i2c_client *client) | |||
530 | cancel_delayed_work(&tps->work); | 530 | cancel_delayed_work(&tps->work); |
531 | flush_scheduled_work(); | 531 | flush_scheduled_work(); |
532 | debugfs_remove(tps->file); | 532 | debugfs_remove(tps->file); |
533 | kfree(tps); | ||
534 | i2c_set_clientdata(client, NULL); | 533 | i2c_set_clientdata(client, NULL); |
534 | kfree(tps); | ||
535 | the_tps = NULL; | 535 | the_tps = NULL; |
536 | return 0; | 536 | return 0; |
537 | } | 537 | } |