Currently the code in the isr checks if the buffer list is not
empty before referencing a buffer and then check again if the
buffer is not NULL. Instead we can save one 'if' statement by
returning if the buffers list is empty.
Also remove non-helpful inline doc 'get one empty buffer'
Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
Acked-by: Helen Koike <helen.koike@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
return;
}
- /* get one empty buffer */
- if (!list_empty(¶ms->params))
- cur_buf = list_first_entry(¶ms->params,
- struct rkisp1_buffer, queue);
-
- if (!cur_buf) {
+ if (list_empty(¶ms->params)) {
spin_unlock(¶ms->config_lock);
return;
}
+ cur_buf = list_first_entry(¶ms->params,
+ struct rkisp1_buffer, queue);
+
new_params = (struct rkisp1_params_cfg *)(cur_buf->vaddr);
rkisp1_isp_isr_other_config(params, new_params);