linux/drivers/soc/amlogic
Johan Hovold 5c8f2499c5 soc: amlogic: canvas: fix device leak on lookup
commit 32200f4828 upstream.

Make sure to drop the reference taken to the canvas platform device when
looking up its driver data.

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

Also note that commit 28f851e6af ("soc: amlogic: canvas: add missing
put_device() call in meson_canvas_get()") fixed the leak in a lookup
error path, but the reference is still leaking on success.

Fixes: d4983983d9 ("soc: amlogic: add meson-canvas driver")
Cc: stable@vger.kernel.org	# 4.20: 28f851e6af
Cc: Yu Kuai <yukuai3@huawei.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Link: https://patch.msgid.link/20250926142454.5929-2-johan@kernel.org
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2026-01-08 10:14:29 +01:00
..
Kconfig pmdomain: amlogic: Move Kconfig options to the pmdomain subsystem 2023-09-20 10:08:45 +02:00
Makefile soc: amlogic: Move power-domain drivers to the genpd dir 2023-07-11 15:30:08 +02:00
meson-canvas.c soc: amlogic: canvas: fix device leak on lookup 2026-01-08 10:14:29 +01:00
meson-clk-measure.c soc: add missing MODULE_DESCRIPTION() macros 2024-06-27 16:42:50 +02:00
meson-gx-socinfo.c soc: amlogic: meson-gx-socinfo: add new SoCs id 2024-08-20 17:27:27 +02:00
meson-mx-socinfo.c meson-mx-socinfo: Fix refcount leak in meson_mx_socinfo_init 2022-05-25 09:19:01 +02:00