summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/pinctrl-mxs.c
diff options
context:
space:
mode:
authorDevendra Naga <devendra.aaru@gmail.com>2012-06-09 17:32:31 +0530
committerLinus Walleij <linus.walleij@linaro.org>2012-06-12 16:26:08 +0200
commit149ff9e1f240e7b57a02e0be5f74f21d0307d1d3 (patch)
tree8f9f4eaeec806671e87eac9283908c13c05b50d3 /drivers/pinctrl/pinctrl-mxs.c
parent0bf7481852c8ece4888c299ba0259b789c3dbde3 (diff)
downloadop-kernel-dev-149ff9e1f240e7b57a02e0be5f74f21d0307d1d3.zip
op-kernel-dev-149ff9e1f240e7b57a02e0be5f74f21d0307d1d3.tar.gz
pinctrl: pinctrl-mxs: set platform driver data to NULL at errpath and at unregister
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> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/pinctrl-mxs.c')
-rw-r--r--drivers/pinctrl/pinctrl-mxs.c2
1 files changed, 2 insertions, 0 deletions
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);
OpenPOWER on IntegriCloud