1
0

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>
Este cometimento está contido em:
Wolfram Sang
2010-03-20 15:12:54 +01:00
cometido por Samuel Ortiz
ascendente d84027bc4d
cometimento f322d5f009
7 ficheiros modificados com 10 adições e 2 eliminações

Ver ficheiro

@@ -530,8 +530,8 @@ static int __exit tps65010_remove(struct i2c_client *client)
cancel_delayed_work(&tps->work);
flush_scheduled_work();
debugfs_remove(tps->file);
kfree(tps);
i2c_set_clientdata(client, NULL);
kfree(tps);
the_tps = NULL;
return 0;
}