Staging: go7007: fix dangling i2c 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> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Родитель
5ff0dd1826
Коммит
665752e528
|
@ -289,6 +289,7 @@ static int wis_saa7113_probe(struct i2c_client *client,
|
|||
if (write_regs(client, initial_registers) < 0) {
|
||||
printk(KERN_ERR
|
||||
"wis-saa7113: error initializing SAA7113\n");
|
||||
i2c_set_clientdata(client, NULL);
|
||||
kfree(dec);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
|
|
@ -422,6 +422,7 @@ static int wis_saa7115_probe(struct i2c_client *client,
|
|||
if (write_regs(client, initial_registers) < 0) {
|
||||
printk(KERN_ERR
|
||||
"wis-saa7115: error initializing SAA7115\n");
|
||||
i2c_set_clientdata(client, NULL);
|
||||
kfree(dec);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
|
|
@ -294,6 +294,7 @@ static int wis_tw9903_probe(struct i2c_client *client,
|
|||
|
||||
if (write_regs(client, initial_registers) < 0) {
|
||||
printk(KERN_ERR "wis-tw9903: error initializing TW9903\n");
|
||||
i2c_set_clientdata(client, NULL);
|
||||
kfree(dec);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче