diff options
author | Philipp Zabel <p.zabel@pengutronix.de> | 2017-06-23 13:57:27 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-07-19 21:19:10 +0200 |
commit | 9c2a4559435e2915209fd9588253111ee1dc2f7a (patch) | |
tree | 3b747f64aabbf2ab07e59799178738fb0a9c8a25 /drivers | |
parent | media: coda: add h264 and mpeg4 profile and level controls (diff) | |
download | linux-9c2a4559435e2915209fd9588253111ee1dc2f7a.tar.xz linux-9c2a4559435e2915209fd9588253111ee1dc2f7a.zip |
media: coda: do not reassign ctx->tiled_map_type in coda_s_fmt
This smatch warning:
coda/coda-common.c:706 coda_s_fmt() warn: missing break? reassigning 'ctx->tiled_map_type'
can be silenced by moving the ctx->tiled_map_type assignment into the
breakout condition. That way the field is not reassigned when falling
through to the next switch statement.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/platform/coda/coda-common.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/media/platform/coda/coda-common.c b/drivers/media/platform/coda/coda-common.c index d119b4777328..90c061e50409 100644 --- a/drivers/media/platform/coda/coda-common.c +++ b/drivers/media/platform/coda/coda-common.c @@ -714,9 +714,10 @@ static int coda_s_fmt(struct coda_ctx *ctx, struct v4l2_format *f, ctx->tiled_map_type = GDI_TILED_FRAME_MB_RASTER_MAP; break; case V4L2_PIX_FMT_NV12: - ctx->tiled_map_type = GDI_TILED_FRAME_MB_RASTER_MAP; - if (!disable_tiling) + if (!disable_tiling) { + ctx->tiled_map_type = GDI_TILED_FRAME_MB_RASTER_MAP; break; + } /* else fall through */ case V4L2_PIX_FMT_YUV420: case V4L2_PIX_FMT_YVU420: |