public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/2] pinctrl: pinctrl-mxs: set platform driver data to NULL at errpath and at unregister
@ 2012-06-09 12:02 Devendra Naga
  2012-06-12 11:32 ` Linus Walleij
  0 siblings, 1 reply; 2+ messages in thread
From: Devendra Naga @ 2012-06-09 12:02 UTC (permalink / raw)
  To: Linus Walleij, linux-kernel; +Cc: Devendra Naga

clear the platform data pointer when mxs_pinctrl_probe_dt fails,
and also before the unregistering with pinctrl subsystem.

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
---
 drivers/pinctrl/pinctrl-mxs.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/pinctrl/pinctrl-mxs.c b/drivers/pinctrl/pinctrl-mxs.c
index 9d46303..afb50ee 100644
--- a/drivers/pinctrl/pinctrl-mxs.c
+++ b/drivers/pinctrl/pinctrl-mxs.c
@@ -516,6 +516,7 @@ int __devinit mxs_pinctrl_probe(struct platform_device *pdev,
 	return 0;
 
 err:
+	platform_set_drvdata(pdev, NULL);
 	iounmap(d->base);
 	return ret;
 }
@@ -525,6 +526,7 @@ int __devexit mxs_pinctrl_remove(struct platform_device *pdev)
 {
 	struct mxs_pinctrl_data *d = platform_get_drvdata(pdev);
 
+	platform_set_drvdata(pdev, NULL);
 	pinctrl_unregister(d->pctl);
 	iounmap(d->base);
 
-- 
1.7.9.5


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

* Re: [PATCH 2/2] pinctrl: pinctrl-mxs: set platform driver data to NULL at errpath and at unregister
  2012-06-09 12:02 [PATCH 2/2] pinctrl: pinctrl-mxs: set platform driver data to NULL at errpath and at unregister Devendra Naga
@ 2012-06-12 11:32 ` Linus Walleij
  0 siblings, 0 replies; 2+ messages in thread
From: Linus Walleij @ 2012-06-12 11:32 UTC (permalink / raw)
  To: Devendra Naga, Dong Aisheng, Shawn Guo; +Cc: linux-kernel

On Sat, Jun 9, 2012 at 2:02 PM, Devendra Naga <devendra.aaru@gmail.com> wrote:

> clear the platform data pointer when mxs_pinctrl_probe_dt fails,
> and also before the unregistering with pinctrl subsystem.
>
> Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>

Applied this as well.

Yours,
Linus Walleij

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

end of thread, other threads:[~2012-06-12 11:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-09 12:02 [PATCH 2/2] pinctrl: pinctrl-mxs: set platform driver data to NULL at errpath and at unregister Devendra Naga
2012-06-12 11:32 ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox