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)
commit41ec66c92299889ad30871aeede89b960f08a458
tree740a9c7d063a3570ca909821079449d1ba6627ae
parent1c8b5d688d7ef401c209f3fc84b7de8296f8908a
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