From: Tien Hock Loh <thloh@altera.com>
To: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: linux-gpio@vger.kernel.org,
Linus Walleij <linus.walleij@linaro.org>,
Alexandre Courbot <gnurou@gmail.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] gpio: altera: use of_mm_gpiochip_remove() to fix memory leak
Date: Thu, 25 Jun 2015 20:17:11 -0700 [thread overview]
Message-ID: <1435288631.22927.3.camel@ubuntu> (raw)
In-Reply-To: <1434542383-21314-1-git-send-email-yamada.masahiro@socionext.com>
Acked-by: Tien Hock Loh <thloh@altera.com>
On Wed, 2015-06-17 at 20:59 +0900, Masahiro Yamada wrote:
> 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>
> ---
>
> drivers/gpio/gpio-altera.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpio/gpio-altera.c b/drivers/gpio/gpio-altera.c
> index 449fb46..c653c83 100644
> --- a/drivers/gpio/gpio-altera.c
> +++ b/drivers/gpio/gpio-altera.c
> @@ -337,7 +337,7 @@ static int altera_gpio_remove(struct platform_device *pdev)
> {
> struct altera_gpio_chip *altera_gc = platform_get_drvdata(pdev);
>
> - gpiochip_remove(&altera_gc->mmchip.gc);
> + of_mm_gpiochip_remove(&altera_gc->mmchip);
>
> return -EIO;
> }
next prev parent reply other threads:[~2015-06-26 3:51 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-17 11:59 [PATCH 1/2] gpio: altera: use of_mm_gpiochip_remove() to fix memory leak Masahiro Yamada
2015-06-17 11:59 ` [PATCH 2/2] gpio: altera: fix return value of altera_gpio_remove() Masahiro Yamada
2015-06-21 7:25 ` Alexandre Courbot
2015-06-22 1:36 ` Tien Hock Loh
2015-06-22 2:25 ` Alexandre Courbot
2015-06-22 10:04 ` Masahiro Yamada
2015-06-26 3:16 ` Tien Hock Loh
2015-06-21 7:22 ` [PATCH 1/2] gpio: altera: use of_mm_gpiochip_remove() to fix memory leak Alexandre Courbot
2015-06-26 3:17 ` Tien Hock Loh [this message]
2015-07-15 9:45 ` Linus Walleij
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1435288631.22927.3.camel@ubuntu \
--to=thloh@altera.com \
--cc=gnurou@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=yamada.masahiro@socionext.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).