Message ID | 20230216014401.225603-1-marex@denx.de |
---|---|
State | Accepted |
Commit | 3e62aba8284de0994a669d07983299242e68fe72 |
Headers | show |
Series | [v3] media: imx-mipi-csis: Check csis_fmt validity before use | expand |
diff --git a/drivers/media/platform/nxp/imx-mipi-csis.c b/drivers/media/platform/nxp/imx-mipi-csis.c index e99633565463e..be2768a479951 100644 --- a/drivers/media/platform/nxp/imx-mipi-csis.c +++ b/drivers/media/platform/nxp/imx-mipi-csis.c @@ -1109,6 +1109,9 @@ static int mipi_csis_get_frame_desc(struct v4l2_subdev *sd, unsigned int pad, csis_fmt = find_csis_format(fmt->code); v4l2_subdev_unlock_state(state); + if (!csis_fmt) + return -EPIPE; + fd->type = V4L2_MBUS_FRAME_DESC_TYPE_PARALLEL; fd->num_entries = 1;