mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
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 <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
This commit is contained in:
parent
0bf7481852
commit
149ff9e1f2
1 changed files with 2 additions and 0 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue