]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
soc: amlogic: canvas: fix device leak on lookup
authorJohan Hovold <johan@kernel.org>
Fri, 26 Sep 2025 14:24:53 +0000 (16:24 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 19 Jan 2026 12:09:54 +0000 (13:09 +0100)
commitdd86de8f8573e5dd2df3c5d465b89d3ef531c6a0
treed4a98c4d498011f48eba7866b1bf9c158cc7f88a
parent5527dde9ff1245031a7fc07ab6e4552e7bf837c2
soc: amlogic: canvas: fix device leak on lookup

commit 32200f4828de9d7e6db379909898e718747f4e18 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 28f851e6afa8 ("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: d4983983d987 ("soc: amlogic: add meson-canvas driver")
Cc: stable@vger.kernel.org # 4.20: 28f851e6afa8
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>
drivers/soc/amlogic/meson-canvas.c