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>
This commit is contained in:
Wolfram Sang
2010-03-20 15:12:54 +01:00
committed by Samuel Ortiz
parent d84027bc4d
commit f322d5f009
7 changed files with 10 additions and 2 deletions

View File

@@ -679,6 +679,7 @@ static int __devexit pcf50633_remove(struct i2c_client *client)
for (i = 0; i < PCF50633_NUM_REGULATORS; i++)
platform_device_unregister(pcf->regulator_pdev[i]);
i2c_set_clientdata(client, NULL);
kfree(pcf);
return 0;