]> git.ipfire.org Git - thirdparty/linux.git/commit
media: nxp: imx8-isi: Fix missing v4l2_subdev_cleanup() in pipe init error path
authorXiaolei Wang <xiaolei.wang@windriver.com>
Thu, 7 May 2026 04:13:17 +0000 (12:13 +0800)
committerHans Verkuil <hverkuil+cisco@kernel.org>
Thu, 21 May 2026 05:41:32 +0000 (07:41 +0200)
commit8262de0663318124824aaafd97ddb5d7bb53bd77
tree328622b2c194711407ae4dd2dd068b79ce6b7c0d
parent567418eedd25b3d86d489807682030b4b98b73d9
media: nxp: imx8-isi: Fix missing v4l2_subdev_cleanup() in pipe init error path

After v4l2_subdev_init_finalize() succeeds in mxc_isi_pipe_init(), if
platform_get_irq() or devm_request_irq() fails, the error path jumps to
a label that only calls media_entity_cleanup() and mutex_destroy(),
missing the v4l2_subdev_cleanup() call needed to free the subdev active
state allocated by v4l2_subdev_init_finalize().

Add an error_subdev label that calls v4l2_subdev_cleanup() before
falling through to the existing error cleanup.

Fixes: cf21f328fcaf ("media: nxp: Add i.MX8 ISI driver")
Cc: stable@vger.kernel.org
Signed-off-by: Xiaolei Wang <xiaolei.wang@windriver.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://patch.msgid.link/20260507041318.491594-4-xiaolei.wang@windriver.com
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
drivers/media/platform/nxp/imx8-isi/imx8-isi-pipe.c