Re: [PATCH] pinctrl: core: Remove extra kref_get which blocks hogs being freed
From: Linus Walleij <hidden>
Date: 2020-02-28 23:33:44
Also in:
lkml
From: Linus Walleij <hidden>
Date: 2020-02-28 23:33:44
Also in:
lkml
On Fri, Feb 28, 2020 at 4:41 PM Charles Keepax [off-list ref] 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@opensource.cirrus.com>Patch applied for fixes. Yours, Linus Walleij