]> git.baikalelectronics.ru Git - kernel.git/commit
pinctrl: core: Remove extra kref_get which blocks hogs being freed
authorCharles Keepax <ckeepax@opensource.cirrus.com>
Fri, 28 Feb 2020 15:41:42 +0000 (15:41 +0000)
committerLinus Walleij <linus.walleij@linaro.org>
Fri, 28 Feb 2020 23:32:41 +0000 (00:32 +0100)
commitdfc06fabd89e8bb74be5829e347aa8ef3d8aa814
tree3b90400d7c3d8b755b0b651806dc620bd66496d4
parente90618096ad2c0c3d666f6b7aa8d787ac27dc138
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: 1f8401d11443 ("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>
drivers/pinctrl/core.c