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: NMasahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: NAlexandre Courbot <acourbot@nvidia.com> Acked-by: NTien Hock Loh <thloh@altera.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
Showing
想要评论请 注册 或 登录