media: rockchip: isp: fix list buf delete err

list_del error for curr_buf to buf_queue list and buf_done_list
pc : list_del+0x4/0x24
lr : destroy_buf_queue+0x170/0x188

Change-Id: Iede1ab20e30d25f4059b39e7896e1a89b3f03f67
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
This commit is contained in:
Cai YiWei
2023-08-21 16:05:00 +08:00
committed by Tao Huang
parent dcfa3a17f6
commit fc49b7fcd0
2 changed files with 6 additions and 0 deletions

View File

@@ -977,7 +977,10 @@ static int mi_frame_end(struct rkisp_stream *stream, u32 state)
(stream->frame_early && state == FRAME_IRQ))
goto end;
} else {
spin_lock_irqsave(&stream->vbq_lock, lock_flags);
buf = stream->curr_buf;
stream->curr_buf = NULL;
spin_unlock_irqrestore(&stream->vbq_lock, lock_flags);
}
if (buf) {

View File

@@ -1408,7 +1408,10 @@ static int mi_frame_end(struct rkisp_stream *stream, u32 state)
(stream->frame_early && state == FRAME_IRQ))
goto end;
} else {
spin_lock_irqsave(&stream->vbq_lock, lock_flags);
buf = stream->curr_buf;
stream->curr_buf = NULL;
spin_unlock_irqrestore(&stream->vbq_lock, lock_flags);
}
if (buf) {