Skip to content

Commit

Permalink
media: coda: jpeg: drop coda9_jpeg_dec_huff_setup() return value
Browse files Browse the repository at this point in the history
coda9_jpeg_dec_huff_setup() never returns anything but 0. Drop
return value and superfluous error handling at the call site.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
  • Loading branch information
pH5 authored and mchehab committed Sep 24, 2022
1 parent 2d0c052 commit cfeacb5
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions drivers/media/platform/chips-media/coda-jpeg.c
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ static inline void coda9_jpeg_write_huff_values(struct coda_dev *dev, u8 *bits,
coda_write(dev, (s32)values[i], CODA9_REG_JPEG_HUFF_DATA);
}

static int coda9_jpeg_dec_huff_setup(struct coda_ctx *ctx)
static void coda9_jpeg_dec_huff_setup(struct coda_ctx *ctx)
{
struct coda_huff_tab *huff_tab = ctx->params.jpeg_huff_tab;
struct coda_dev *dev = ctx->dev;
Expand Down Expand Up @@ -455,7 +455,6 @@ static int coda9_jpeg_dec_huff_setup(struct coda_ctx *ctx)
coda9_jpeg_write_huff_values(dev, huff_tab->luma_ac, 162);
coda9_jpeg_write_huff_values(dev, huff_tab->chroma_ac, 162);
coda_write(dev, 0x000, CODA9_REG_JPEG_HUFF_CTRL);
return 0;
}

static inline void coda9_jpeg_write_qmat_tab(struct coda_dev *dev,
Expand Down Expand Up @@ -1394,14 +1393,8 @@ static int coda9_jpeg_prepare_decode(struct coda_ctx *ctx)
coda_write(dev, ctx->params.jpeg_restart_interval,
CODA9_REG_JPEG_RST_INTVAL);

if (ctx->params.jpeg_huff_tab) {
ret = coda9_jpeg_dec_huff_setup(ctx);
if (ret < 0) {
v4l2_err(&dev->v4l2_dev,
"failed to set up Huffman tables: %d\n", ret);
return ret;
}
}
if (ctx->params.jpeg_huff_tab)
coda9_jpeg_dec_huff_setup(ctx);

coda9_jpeg_qmat_setup(ctx);

Expand Down

0 comments on commit cfeacb5

Please sign in to comment.