]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
media: ti: vpe: Fix fwnode_handle leak in vip_probe_complete()
authorFelix Gu <ustc.gu@gmail.com>
Tue, 17 Mar 2026 17:21:53 +0000 (01:21 +0800)
committerHans Verkuil <hverkuil+cisco@kernel.org>
Tue, 5 May 2026 14:57:02 +0000 (16:57 +0200)
commit34ca1065a4b2cf776c28d7cece6f6c9d90f7e3a3
tree5e6b833dee9a0b1f7ed650af9bdf8c5fe642e654
parent7d8bf3d8f91073f4db347ed3aa6302b56107499c
media: ti: vpe: Fix fwnode_handle leak in vip_probe_complete()

In vip_probe_complete(), the fwnode_handle reference is not released
if the loop continues via the default switch case or if alloc_port()
fails. This results in a reference count leak.

Switch to using the __free(fwnode_handle) cleanup attribute to ensure
the reference is automatically released when the handle goes out of
scope.

Fixes: fc2873aa4a21 ("media: ti: vpe: Add the VIP driver")
Cc: stable@vger.kernel.org
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
drivers/media/platform/ti/vpe/vip.c