mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-05-24 10:39:52 +00:00
gpio: removing kfree remove functionality
commit 3de07e5aaf290a0b58919 ("drivers: gpio: use devm_kzalloc") introduce devm_kzalloc() for allocating the memory. In this case kfree is not required to use. Above commit id introduced the bug that kfree is not removed from the remove function. This patch fix the above bug. Signed-off-by: Varka Bhadram <varkab@cdac.in> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
61819549f5
commit
c4941e072e
2 changed files with 1 additions and 2 deletions
|
@ -471,7 +471,6 @@ static int adp5588_gpio_remove(struct i2c_client *client)
|
|||
|
||||
gpiochip_remove(&dev->gpio_chip);
|
||||
|
||||
kfree(dev);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -1008,7 +1008,7 @@ static int mcp23s08_remove(struct spi_device *spi)
|
|||
mcp23s08_irq_teardown(data->mcp[addr]);
|
||||
gpiochip_remove(&data->mcp[addr]->chip);
|
||||
}
|
||||
kfree(data);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue