Skip to content
Permalink
Browse files Browse the repository at this point in the history
pinctrl/amd: 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: 3bfd443 ("pinctrl: amd: Add support for additional GPIO")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
  • Loading branch information
Wei Yongjun authored and linusw committed Jan 18, 2017
1 parent 1fe8d6c commit 8dca4a4
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/pinctrl/pinctrl-amd.c
Expand Up @@ -836,7 +836,6 @@ static int amd_gpio_remove(struct platform_device *pdev)
gpio_dev = platform_get_drvdata(pdev);

gpiochip_remove(&gpio_dev->gc);
pinctrl_unregister(gpio_dev->pctrl);

return 0;
}
Expand Down

0 comments on commit 8dca4a4

Please sign in to comment.