]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
soc: versatile: realview: fix memory leak during device remove
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Sun, 25 Aug 2024 18:05:23 +0000 (20:05 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Oct 2024 14:29:57 +0000 (16:29 +0200)
commitc48d5ad1c4b822e40a41117440db0da66870fca3
treec3e4365366cf90586cc7b7724a3ef209dcf7b88e
parentf6bda3f118e385f395ece12384c7730fead4cc32
soc: versatile: realview: fix memory leak during device remove

[ Upstream commit 1c4f26a41f9d052f334f6ae629e01f598ed93508 ]

If device is unbound, the memory allocated for soc_dev_attr should be
freed to prevent leaks.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/20240825-soc-dev-fixes-v1-2-ff4b35abed83@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Stable-dep-of: c774f2564c00 ("soc: versatile: realview: fix soc_dev leak during device remove")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/soc/versatile/soc-realview.c