Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

pinctrl: mxs: remove unnecessary platform_set_drvdata()

The driver core clears the driver data to NULL after device_release
or on probe failure, since commit 0998d0631001288a5974afc0b2a5f568bcdecb4d
(device-core: Ensure drvdata = NULL when no driver is bound).
Thus, it is not needed to manually clear the device driver data to NULL.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

authored by

Jingoo Han and committed by
Linus Walleij
59eb14dc c87feeeb

-2
-2
drivers/pinctrl/pinctrl-mxs.c
··· 515 515 return 0; 516 516 517 517 err: 518 - platform_set_drvdata(pdev, NULL); 519 518 iounmap(d->base); 520 519 return ret; 521 520 } ··· 524 525 { 525 526 struct mxs_pinctrl_data *d = platform_get_drvdata(pdev); 526 527 527 - platform_set_drvdata(pdev, NULL); 528 528 pinctrl_unregister(d->pctl); 529 529 iounmap(d->base); 530 530