[PATCH] firmware: meson_sm: fix device leak at probe

Martin Blumenstingl martin.blumenstingl at googlemail.com
Sat Aug 2 03:02:05 PDT 2025


On Fri, Jul 25, 2025 at 9:41 AM Johan Hovold <johan at kernel.org> wrote:
>
> 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 at vger.kernel.org      # 5.5
> Cc: Carlo Caione <ccaione at baylibre.com>
> Signed-off-by: Johan Hovold <johan at kernel.org>
Acked-by: Martin Blumenstingl <martin.blumenstingl at googlemail.com>



More information about the linux-amlogic mailing list