提交 2ce7c62d 编写于 作者: A Alexander Shiyan 提交者: Linus Walleij

GPIO: gpio-generic: remove kfree() from bgpio_remove call

Memory for basic-mmio-gpio driver is allocated by the driver
using it, whether it's the generic GPIO driver itself or another
driver. In either case, the owner shall allocate and free the
struct bgpio_chip it is using, preferably using a managed
resource.
Signed-off-by: NAlexander Shiyan <shc_work@mail.ru>
Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
上级 7fc7acb9
...@@ -390,11 +390,7 @@ static int bgpio_setup_direction(struct bgpio_chip *bgc, ...@@ -390,11 +390,7 @@ static int bgpio_setup_direction(struct bgpio_chip *bgc,
int bgpio_remove(struct bgpio_chip *bgc) int bgpio_remove(struct bgpio_chip *bgc)
{ {
int err = gpiochip_remove(&bgc->gc); return gpiochip_remove(&bgc->gc);
kfree(bgc);
return err;
} }
EXPORT_SYMBOL_GPL(bgpio_remove); EXPORT_SYMBOL_GPL(bgpio_remove);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册