Skip to content

Commit aafd56f

Browse files
charleskeepaxlinusw
authored andcommitted
pinctrl: core: Remove extra kref_get which blocks hogs being freed
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: 6118714 ("pinctrl: core: Fix pinctrl_register_and_init() with pinctrl_enable()") Signed-off-by: Charles Keepax <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Linus Walleij <[email protected]>
1 parent 4c48e54 commit aafd56f

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

drivers/pinctrl/core.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2021,7 +2021,6 @@ static int pinctrl_claim_hogs(struct pinctrl_dev *pctldev)
20212021
return PTR_ERR(pctldev->p);
20222022
}
20232023

2024-
kref_get(&pctldev->p->users);
20252024
pctldev->hog_default =
20262025
pinctrl_lookup_state(pctldev->p, PINCTRL_STATE_DEFAULT);
20272026
if (IS_ERR(pctldev->hog_default)) {

0 commit comments

Comments
 (0)