mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
gpio: max730x: eliminate double free
The function __max730x_remove is called from the remove functions of drivers/gpio/gpio-max7300.c and drivers/gpio/gpio-max7301.c. In both cases, the probe function allocates ts using devm_kzalloc. Explicitly freeing such a value with kfree will cause a double free. Signed-off-by: Julia Lawall <[email protected]> Reviewed-by: Alexandre Courbot <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
This commit is contained in:
parent
450fa54cfd
commit
7474f23dd0
1 changed files with 0 additions and 1 deletions
|
|
@ -236,7 +236,6 @@ int __max730x_remove(struct device *dev)
|
|||
ts->write(dev, 0x04, 0x00);
|
||||
gpiochip_remove(&ts->chip);
|
||||
mutex_destroy(&ts->lock);
|
||||
kfree(ts);
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(__max730x_remove);
|
||||
|
|
|
|||
Loading…
Reference in a new issue