pinctrl: zynqmp: Drop pinctrl_unregister for devm_ registered device

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

Fixes: fa99e70138 ("pinctrl: zynqmp: some code cleanups")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Reviewed-by: Michal Simek <michal.simek@xilinx.com>
Link: https://lore.kernel.org/r/20210729071905.3235953-1-yangyingliang@huawei.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
Yang Yingliang 2021-07-29 15:19:05 +08:00 коммит произвёл Linus Walleij
Родитель f03f5c75f5
Коммит 3fb5c90452
1 изменённых файлов: 0 добавлений и 10 удалений

Просмотреть файл

@ -866,15 +866,6 @@ static int zynqmp_pinctrl_probe(struct platform_device *pdev)
return ret;
}
static int zynqmp_pinctrl_remove(struct platform_device *pdev)
{
struct zynqmp_pinctrl *pctrl = platform_get_drvdata(pdev);
pinctrl_unregister(pctrl->pctrl);
return 0;
}
static const struct of_device_id zynqmp_pinctrl_of_match[] = {
{ .compatible = "xlnx,zynqmp-pinctrl" },
{ }
@ -887,7 +878,6 @@ static struct platform_driver zynqmp_pinctrl_driver = {
.of_match_table = zynqmp_pinctrl_of_match,
},
.probe = zynqmp_pinctrl_probe,
.remove = zynqmp_pinctrl_remove,
};
module_platform_driver(zynqmp_pinctrl_driver);