In the Linux kernel prior to 4.7, the amd_gpio_remove function in drivers/pinctrl/pinctrl-amd.c calls the pinctrl_unregister function, leading to a double free.
In the Linux kernel before 47, the amd_gpio_remove function in drivers/pinctrl/pinctrl-amdc calls the pinctrl_unregister function, leading to a double free ...