Re: [PATCH] pinctrl: core: Remove extra kref_get which blocks hogs being freed

From: Linus Walleij
Date: Fri Feb 28 2020 - 18:33:44 EST


On Fri, Feb 28, 2020 at 4:41 PM Charles Keepax
<ckeepax@xxxxxxxxxxxxxxxxxxxxx> wrote:

> kref_init starts with the reference count at 1, which will be balanced
> by the pinctrl_put in pinctrl_unregister. The additional kref_get in
> pinctrl_claim_hogs will increase this count to 2 and cause the hogs to
> not get freed when pinctrl_unregister is called.
>
> Fixes: 6118714275f0 ("pinctrl: core: Fix pinctrl_register_and_init() with pinctrl_enable()")
> Signed-off-by: Charles Keepax <ckeepax@xxxxxxxxxxxxxxxxxxxxx>

Patch applied for fixes.

Yours,
Linus Walleij