diff --git a/drivers/pinctrl/sh-pfc/core.c b/drivers/pinctrl/sh-pfc/core.c index 9a085cbb9d1808916adfbe0713bdc8ec25fa0783..da2bf79339064b372c244bab5e037af8d537d707 100644 --- a/drivers/pinctrl/sh-pfc/core.c +++ b/drivers/pinctrl/sh-pfc/core.c @@ -598,10 +598,8 @@ static int sh_pfc_probe(struct platform_device *pdev) static int sh_pfc_remove(struct platform_device *pdev) { - struct sh_pfc *pfc = platform_get_drvdata(pdev); - #ifdef CONFIG_PINCTRL_SH_PFC_GPIO - sh_pfc_unregister_gpiochip(pfc); + sh_pfc_unregister_gpiochip(platform_get_drvdata(pdev)); #endif return 0;