[PATCH v12 78/86] media: ipu6: Avoid accessing av->streams before streaming

Sakari Ailus
2026-04-09T20:15:15Z

Streams will soon be allocated just for the duration of streaming
operation. In this case, obtain the CSI-2 sub-device through av->csi2
which is set up during driver probe.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
drivers/media/pci/intel/ipu6/ipu6-isys-video.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/pci/intel/ipu6/ipu6-isys-video.c b/drivers/media/pci/intel/ipu6/ipu6-isys-video.c
index 9d0ed47df280..56ed1a4c45d6 100644
--- a/drivers/media/pci/intel/ipu6/ipu6-isys-video.c
+++ b/drivers/media/pci/intel/ipu6/ipu6-isys-video.c
@@ -960,7 +960,7 @@ int ipu6_isys_video_set_streaming(struct ipu6_isys_video *av, int state)
struct media_pad *r_pad;
int ret = 0;

- sd = &av->stream->asd->sd;
+ sd = &av->csi2->asd.sd;
r_pad = media_pad_remote_pad_first(&av->pad);

if (!state) {
--
2.47.3