media: rockchip: vicap fixed Segment fault while sditf connect fail

Call trace:
  media_entity_remote_pad+0x18/0x48
  rkcif_stop_streaming+0x18/0x24
  __vb2_queue_cancel+0x38/0x274
  vb2_core_streamoff+0x28/0xac
  vb2_ioctl_streamoff+0x5c/0x8c
  v4l_streamoff+0x24/0x30
  __video_do_ioctl+0x2c4/0x3c4
  video_usercopy+0x360/0x6fc
  video_ioctl2+0x18/0x24
  v4l2_ioctl+0x4c/0x5c
  do_video_ioctl+0x7cc/0xb10
  v4l2_compat_ioctl32+0x5c/0x98
  __arm64_compat_sys_ioctl+0x104/0x158
  el0_svc_common+0xac/0x1ac
  do_el0_svc_compat+0x1c/0x28
  el0_svc_compat+0x10/0x1c
  el0_sync_compat_handler+0x60/0x8c
  el0_sync_compat+0x164/0x180

Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I5f5224929a484c7a9c4931ccb1547d6036e08322
This commit is contained in:
Zefa Chen
2023-01-12 18:57:11 +08:00
committed by Tao Huang
parent 4973c13274
commit 544caf2af2

View File

@@ -1435,7 +1435,7 @@ static void rkcif_rx_buffer_free(struct rkcif_stream *stream)
struct rkisp_rx_buf *dbufs;
struct rkcif_device *dev = stream->cifdev;
if (dev->sditf[0]) {
if (dev->sditf[0] && dev->sditf[0]->num_sensors != 0) {
if (dev->sditf[0]->is_combine_mode)
pad = media_entity_remote_pad(&dev->sditf[0]->pads[1]);
else