diff options
author | Fei Shao <fshao@chromium.org> | 2023-06-19 11:22:53 +0800 |
---|---|---|
committer | Stephen Boyd <sboyd@kernel.org> | 2023-06-20 12:03:21 -0700 |
commit | 7fb933e56f77a57ef7cfc59fc34cbbf1b1fa31ff (patch) | |
tree | 2794c4a6b511286e1b088c760fc094d945c261ca /fs/fs_pin.c | |
parent | bd73d1fd63d4f67dc78640c9ae4f83e20a021d76 (diff) |
clk: Fix memory leak in devm_clk_notifier_register()
devm_clk_notifier_register() allocates a devres resource for clk
notifier but didn't register that to the device, so the notifier didn't
get unregistered on device detach and the allocated resource was leaked.
Fix the issue by registering the resource through devres_add().
This issue was found with kmemleak on a Chromebook.
Fixes: 6d30d50d037d ("clk: add devm variant of clk_notifier_register")
Signed-off-by: Fei Shao <fshao@chromium.org>
Link: https://lore.kernel.org/r/20230619112253.v2.1.I13f060c10549ef181603e921291bdea95f83033c@changeid
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'fs/fs_pin.c')
0 files changed, 0 insertions, 0 deletions