]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
media: imx-mipi-csis: Check csis_fmt validity before use
authorMarek Vasut <marex@denx.de>
Thu, 16 Feb 2023 01:44:01 +0000 (02:44 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Sun, 26 Feb 2023 10:21:33 +0000 (11:21 +0100)
commit3e62aba8284de0994a669d07983299242e68fe72
treed282e137bfee8aa6c2cf8bb3cc3611244558dd0f
parent68e87ebf2605643072264ed452f4e560417ddb1b
media: imx-mipi-csis: Check csis_fmt validity before use

The find_csis_format() may return NULL in case supported format is not
found, check the return value of find_csis_format() before using the
result to avoid NULL pointer dereference.

Fixes: 11927d0fd0d0 ("media: imx-mipi-csis: Use V4L2 subdev active state")
Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/platform/nxp/imx-mipi-csis.c