Commit f23e5f40 authored by Ezequiel Garcia's avatar Ezequiel Garcia Committed by Mauro Carvalho Chehab

media: coda: Remove redundant ctx->initialized setting

The ctx->initialized flag is set in __coda_decoder_seq_init,
so it's redundant to set it in coda_dec_seq_init_work.
Remove the redundant set, which allows to simplify the
implementation quite a bit.

This change shouldn't affect functionality as it's just
cosmetics.
Signed-off-by: default avatarEzequiel Garcia <ezequiel@collabora.com>
Reviewed-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent af0321a5
...@@ -2005,21 +2005,13 @@ static void coda_dec_seq_init_work(struct work_struct *work) ...@@ -2005,21 +2005,13 @@ static void coda_dec_seq_init_work(struct work_struct *work)
struct coda_ctx *ctx = container_of(work, struct coda_ctx *ctx = container_of(work,
struct coda_ctx, seq_init_work); struct coda_ctx, seq_init_work);
struct coda_dev *dev = ctx->dev; struct coda_dev *dev = ctx->dev;
int ret;
mutex_lock(&ctx->buffer_mutex); mutex_lock(&ctx->buffer_mutex);
mutex_lock(&dev->coda_mutex); mutex_lock(&dev->coda_mutex);
if (ctx->initialized == 1) if (!ctx->initialized)
goto out; __coda_decoder_seq_init(ctx);
ret = __coda_decoder_seq_init(ctx);
if (ret < 0)
goto out;
ctx->initialized = 1;
out:
mutex_unlock(&dev->coda_mutex); mutex_unlock(&dev->coda_mutex);
mutex_unlock(&ctx->buffer_mutex); mutex_unlock(&ctx->buffer_mutex);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment