From 8ccfc15380e95e0219c42bc4bb3498d2bdb2cfb6 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Fri, 27 Jan 2023 02:21:57 +0100 Subject: [PATCH] media: imx: imx7-media-csi: Drop unneeded src_sd check The .s_stream() and .link_validate() operations can't be called with a NULL src_sd, as subdev nodes are not registered before the async notifier completes. Remove the unneeded checks. Signed-off-by: Laurent Pinchart Tested-by: Adam Ford #imx8mm-beacon-kit Acked-by: Rui Miguel Silva Tested-by: Martin Kepplinger Signed-off-by: Mauro Carvalho Chehab --- drivers/media/platform/nxp/imx7-media-csi.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/drivers/media/platform/nxp/imx7-media-csi.c b/drivers/media/platform/nxp/imx7-media-csi.c index 45b29d3122763..62232cd6775f6 100644 --- a/drivers/media/platform/nxp/imx7-media-csi.c +++ b/drivers/media/platform/nxp/imx7-media-csi.c @@ -1731,11 +1731,6 @@ static int imx7_csi_s_stream(struct v4l2_subdev *sd, int enable) mutex_lock(&csi->lock); - if (!csi->src_sd) { - ret = -EPIPE; - goto out_unlock; - } - if (enable) { ret = imx7_csi_init(csi); if (ret < 0) @@ -2026,9 +2021,6 @@ static int imx7_csi_pad_link_validate(struct v4l2_subdev *sd, unsigned int i; int ret; - if (!csi->src_sd) - return -EPIPE; - /* * Validate the source link, and record whether the source uses the * parallel input or the CSI-2 receiver. -- 2.30.2