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:

cometido por
Samuel Ortiz

ascendente
d84027bc4d
cometimento
f322d5f009
@@ -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;
|
||||
}
|
||||
|
Criar uma nova questão referindo esta
Bloquear um utilizador