linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] pinctrl/amd: Drop pinctrl_unregister for devm_ registered device
@ 2017-01-17 15:55 Wei Yongjun
  2017-01-18 23:15 ` Linus Walleij
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2017-01-17 15:55 UTC (permalink / raw)
  To: Linus Walleij, Shah, Nehal-bakulchandra; +Cc: Wei Yongjun, linux-gpio

From: Wei Yongjun <weiyongjun1@huawei.com>

It's not necessary to unregister pin controller device registered
with devm_pinctrl_register() and using pinctrl_unregister() leads
to a double free.

Fixes: 3bfd44306c65 ("pinctrl: amd: Add support for additional GPIO")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/pinctrl/pinctrl-amd.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/pinctrl/pinctrl-amd.c b/drivers/pinctrl/pinctrl-amd.c
index c64ea8f..586001c 100644
--- a/drivers/pinctrl/pinctrl-amd.c
+++ b/drivers/pinctrl/pinctrl-amd.c
@@ -831,7 +831,6 @@ static int amd_gpio_remove(struct platform_device *pdev)
 	gpio_dev = platform_get_drvdata(pdev);
 
 	gpiochip_remove(&gpio_dev->gc);
-	pinctrl_unregister(gpio_dev->pctrl);
 
 	return 0;
 }


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-01-18 23:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-17 15:55 [PATCH -next] pinctrl/amd: Drop pinctrl_unregister for devm_ registered device Wei Yongjun
2017-01-18 23:15 ` 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).