diff options
author | Charles Keepax <ckeepax@opensource.cirrus.com> | 2020-02-28 15:41:42 +0000 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2020-02-29 00:32:41 +0100 |
commit | aafd56fc79041bf36f97712d4b35208cbe07db90 (patch) | |
tree | 3b90400d7c3d8b755b0b651806dc620bd66496d4 /drivers/pinctrl | |
parent | 4c48e549f39f8ed10cf8a0b6cb96f5eddf0391ce (diff) | |
download | linux-aafd56fc79041bf36f97712d4b35208cbe07db90.tar.bz2 |
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: 6118714275f0 ("pinctrl: core: Fix pinctrl_register_and_init() with pinctrl_enable()")
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20200228154142.13860-1-ckeepax@opensource.cirrus.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r-- | drivers/pinctrl/core.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c index 446d84fe0e31..f23c55e22195 100644 --- a/drivers/pinctrl/core.c +++ b/drivers/pinctrl/core.c @@ -2021,7 +2021,6 @@ static int pinctrl_claim_hogs(struct pinctrl_dev *pctldev) return PTR_ERR(pctldev->p); } - kref_get(&pctldev->p->users); pctldev->hog_default = pinctrl_lookup_state(pctldev->p, PINCTRL_STATE_DEFAULT); if (IS_ERR(pctldev->hog_default)) { |