* [PATCH] gpio: max730x: Remove kfree(ts) in __max730x_remove()
@ 2014-04-14 7:30 Axel Lin
2014-04-14 8:21 ` Juergen Beisert
2014-04-22 13:42 ` Linus Walleij
0 siblings, 2 replies; 4+ messages in thread
From: Axel Lin @ 2014-04-14 7:30 UTC (permalink / raw)
To: Linus Walleij
Cc: Wolfram Sang, Juergen Beisert, Alexandre Courbot, linux-gpio,
Jingoo Han
>From f52622585aeb4cf785c78548e440993a1e9625b1 Mon Sep 17 00:00:00 2001
From: Axel Lin <axel.lin@ingics.com>
Date: Mon, 14 Apr 2014 15:20:15 +0800
Subject: [PATCH] gpio: max730x: Remove kfree(ts) in __max730x_remove()
The memory for ts is allocated by devm_kzalloc now, so the kfree is not
required.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
I think this change is missed in:
commit c3fe2bf4916 gpio: max7300: use devm_kzalloc()
commit 4cb06cd58c2 gpio: max7301: use devm_kzalloc()
drivers/gpio/gpio-max730x.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/gpio/gpio-max730x.c b/drivers/gpio/gpio-max730x.c
index 8672755..0814584 100644
--- a/drivers/gpio/gpio-max730x.c
+++ b/drivers/gpio/gpio-max730x.c
@@ -237,10 +237,9 @@ int __max730x_remove(struct device *dev)
ts->write(dev, 0x04, 0x00);
ret = gpiochip_remove(&ts->chip);
- if (!ret) {
+ if (!ret)
mutex_destroy(&ts->lock);
- kfree(ts);
- } else
+ else
dev_err(dev, "Failed to remove GPIO controller: %d\n", ret);
return ret;
--
1.8.3.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] gpio: max730x: Remove kfree(ts) in __max730x_remove()
2014-04-14 7:30 [PATCH] gpio: max730x: Remove kfree(ts) in __max730x_remove() Axel Lin
@ 2014-04-14 8:21 ` Juergen Beisert
2014-04-14 8:34 ` Jingoo Han
2014-04-22 13:42 ` Linus Walleij
1 sibling, 1 reply; 4+ messages in thread
From: Juergen Beisert @ 2014-04-14 8:21 UTC (permalink / raw)
To: Axel Lin
Cc: Linus Walleij, Wolfram Sang, Alexandre Courbot, linux-gpio,
Jingoo Han
On Monday 14 April 2014 09:30:41 Axel Lin wrote:
> From f52622585aeb4cf785c78548e440993a1e9625b1 Mon Sep 17 00:00:00 2001
> From: Axel Lin <axel.lin@ingics.com>
> Date: Mon, 14 Apr 2014 15:20:15 +0800
> Subject: [PATCH] gpio: max730x: Remove kfree(ts) in __max730x_remove()
>
> The memory for ts is allocated by devm_kzalloc now, so the kfree is not
> required.
>
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
Good catch.
Acked-by: Juergen Beisert <jbe@pengutronix.de>
--
Pengutronix e.K. | Juergen Beisert |
Linux Solutions for Science and Industry | http://www.pengutronix.de/ |
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] gpio: max730x: Remove kfree(ts) in __max730x_remove()
2014-04-14 8:21 ` Juergen Beisert
@ 2014-04-14 8:34 ` Jingoo Han
0 siblings, 0 replies; 4+ messages in thread
From: Jingoo Han @ 2014-04-14 8:34 UTC (permalink / raw)
To: 'Linus Walleij', 'Axel Lin'
Cc: 'Juergen Beisert', 'Wolfram Sang',
'Alexandre Courbot', linux-gpio, 'Jingoo Han'
On Monday, April 14, 2014 5:21 PM, Juergen Beisert wrote:
> On Monday 14 April 2014 09:30:41 Axel Lin wrote:
> > From f52622585aeb4cf785c78548e440993a1e9625b1 Mon Sep 17 00:00:00 2001
> > From: Axel Lin <axel.lin@ingics.com>
> > Date: Mon, 14 Apr 2014 15:20:15 +0800
> > Subject: [PATCH] gpio: max730x: Remove kfree(ts) in __max730x_remove()
> >
> > The memory for ts is allocated by devm_kzalloc now, so the kfree is not
> > required.
> >
> > Signed-off-by: Axel Lin <axel.lin@ingics.com>
>
> Good catch.
>
> Acked-by: Juergen Beisert <jbe@pengutronix.de>
Reviewed-by: Jingoo Han <jg1.han@samsung.com>
Best regards,
Jingoo Han
>
> --
> Pengutronix e.K. | Juergen Beisert |
> Linux Solutions for Science and Industry | http://www.pengutronix.de/ |
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] gpio: max730x: Remove kfree(ts) in __max730x_remove()
2014-04-14 7:30 [PATCH] gpio: max730x: Remove kfree(ts) in __max730x_remove() Axel Lin
2014-04-14 8:21 ` Juergen Beisert
@ 2014-04-22 13:42 ` Linus Walleij
1 sibling, 0 replies; 4+ messages in thread
From: Linus Walleij @ 2014-04-22 13:42 UTC (permalink / raw)
To: Axel Lin
Cc: Wolfram Sang, Juergen Beisert, Alexandre Courbot,
linux-gpio@vger.kernel.org, Jingoo Han
On Mon, Apr 14, 2014 at 9:30 AM, Axel Lin <axel.lin@ingics.com> wrote:
> From f52622585aeb4cf785c78548e440993a1e9625b1 Mon Sep 17 00:00:00 2001
> From: Axel Lin <axel.lin@ingics.com>
> Date: Mon, 14 Apr 2014 15:20:15 +0800
> Subject: [PATCH] gpio: max730x: Remove kfree(ts) in __max730x_remove()
>
> The memory for ts is allocated by devm_kzalloc now, so the kfree is not
> required.
>
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
Patch applied with all ACKs, also fixed up this weird commit message.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-04-22 13:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-14 7:30 [PATCH] gpio: max730x: Remove kfree(ts) in __max730x_remove() Axel Lin
2014-04-14 8:21 ` Juergen Beisert
2014-04-14 8:34 ` Jingoo Han
2014-04-22 13:42 ` Linus Walleij
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).