]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
firmware: meson_sm: fix device leak at probe
authorJohan Hovold <johan@kernel.org>
Fri, 25 Jul 2025 07:40:19 +0000 (09:40 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 19 Oct 2025 14:23:11 +0000 (16:23 +0200)
commit796594990b3ce594ed1c697708aae3fc67af26d9
tree0ee7c0e915b77daf7ce2500bc4fa24be36a70979
parent8c0c3e1bb8599fc1d7cc7c95657e73596e88bee3
firmware: meson_sm: fix device leak at probe

commit 8ece3173f87df03935906d0c612c2aeda9db92ca upstream.

Make sure to drop the reference to the secure monitor device taken by
of_find_device_by_node() when looking up its driver data on behalf of
other drivers (e.g. during probe).

Note that holding a reference to the platform device does not prevent
its driver data from going away so there is no point in keeping the
reference after the helper returns.

Fixes: 8cde3c2153e8 ("firmware: meson_sm: Rework driver as a proper platform driver")
Cc: stable@vger.kernel.org # 5.5
Cc: Carlo Caione <ccaione@baylibre.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Link: https://lore.kernel.org/r/20250725074019.8765-1-johan@kernel.org
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/firmware/meson/meson_sm.c