]> git.baikalelectronics.ru Git - kernel.git/commit
gpio: altera: use of_mm_gpiochip_remove() to fix memory leak
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Wed, 17 Jun 2015 11:59:42 +0000 (20:59 +0900)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 15 Jul 2015 22:11:03 +0000 (00:11 +0200)
commit1a525c277548e018ba84adf290a150cf22ebb43f
tree740a9c7d063a3570ca909821079449d1ba6627ae
parent68a89ca324014a45e5ef876b6a7e66b3d155e2de
gpio: altera: use of_mm_gpiochip_remove() to fix memory leak

This driver calls of_mm_gpiochip_add() to add a memory mapped gpio
chip.  So, of_mm_gpiochip_remove() should be used when removing it.

The direct call of gpiochip_remove() misses unmapping the register
and freeing the label.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
Acked-by: Tien Hock Loh <thloh@altera.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-altera.c