media: rockchip: vicap: fixes error of access a nonexistent tools_vdev

Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: Ia872c7c14eba23ce9d4f38ec152c7705384fcdf1
This commit is contained in:
Zefa Chen
2023-03-28 15:29:44 +08:00
committed by Tao Huang
parent eedd15d9e4
commit 913273ca12

View File

@@ -7857,14 +7857,14 @@ static void rkcif_buf_done_prepare(struct rkcif_stream *stream,
if (stream->cif_fmt_in->field == V4L2_FIELD_INTERLACED) {
if (stream->frame_phase == CIF_CSI_FRAME1_READY && active_buf) {
if (cif_dev->is_support_tools)
if (cif_dev->is_support_tools && stream->tools_vdev)
rkcif_buf_done_with_tools(stream, active_buf);
else
rkcif_vb_done_tasklet(stream, active_buf);
}
} else {
if (active_buf) {
if (cif_dev->is_support_tools)
if (cif_dev->is_support_tools && stream->tools_vdev)
rkcif_buf_done_with_tools(stream, active_buf);
else
rkcif_vb_done_tasklet(stream, active_buf);