Re: [PATCH] pinctrl: core: do not explicitly free on unregister

From: Linus Walleij
Date: Tue May 23 2017 - 04:20:45 EST


On Tue, May 16, 2017 at 8:18 AM, Stefan Agner <stefan@xxxxxxxx> wrote:

> When using the resource managed version of pinctrl, resources
> might already been freed when pinctrl_unregister is called by the
> devres framework. When calling devm_kfree on such a already freed
> resource, devres prints a warning:
> WARNING: CPU: 0 PID: 1 at drivers/base/devres.c:891 pinmux_generic_free_functions+0xf4/0x128
> ...
>
> Solve this by not explicitly free resources. The two affected
> functions (pinmux_generic_free_functions/pinctrl_generic_free_groups)
> are only used in pinctrl_unregister. When not using the resource
> managed version of pinctrl, the underlying device will presumably
> get freed freed soon anyway.
>
> Signed-off-by: Stefan Agner <stefan@xxxxxxxx>

I think this is no longer needed after the fix from Tony
"pinctrl: core: Fix warning by removing bogus code"

Yours,
Linus Walleij