diff mbox series

media: coda: assert bitstream mutex is locked in coda_fill_bitstream

Message ID 20220405135035.3428144-1-p.zabel@pengutronix.de
State Accepted
Commit 87e0ce68cc0216063c6329aca0c31961a33a5372
Headers show
Series media: coda: assert bitstream mutex is locked in coda_fill_bitstream | expand

Commit Message

Philipp Zabel April 5, 2022, 1:50 p.m. UTC
coda_fill_bitstream() must be called under the bitstream mutex.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
---
 drivers/media/platform/chips-media/coda-bit.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/drivers/media/platform/chips-media/coda-bit.c b/drivers/media/platform/chips-media/coda-bit.c
index 705a179ea8f0..3aad8999a3b3 100644
--- a/drivers/media/platform/chips-media/coda-bit.c
+++ b/drivers/media/platform/chips-media/coda-bit.c
@@ -326,6 +326,8 @@  void coda_fill_bitstream(struct coda_ctx *ctx, struct list_head *buffer_list)
 	struct coda_buffer_meta *meta;
 	u32 start;
 
+	lockdep_assert_held(&ctx->bitstream_mutex);
+
 	if (ctx->bit_stream_param & CODA_BIT_STREAM_END_FLAG)
 		return;