OSDN Git Service

media: coda: ctx->codec is not NULL in coda_alloc_framebuffers
authorPhilipp Zabel <p.zabel@pengutronix.de>
Thu, 8 Jun 2017 09:21:13 +0000 (06:21 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Sat, 24 Jun 2017 12:35:35 +0000 (09:35 -0300)
commit9b80f12e319198cef65076654ccaa4b2783a2fa1
treeb316ebf43ceaa4c420cab63e1dc4ce9a4df1e1bf
parentbe78b59e4806337b447a07a5042f4ef84b047c1a
media: coda: ctx->codec is not NULL in coda_alloc_framebuffers

This fixes a smatch warning:

    drivers/media/platform/coda/coda-bit.c:415 coda_alloc_framebuffers()
    error: we previously assumed 'ctx->codec' could be null (see line 396)

coda_alloc_framebuffers() is called from coda_start_encoding() and
__coda_start_decoding(). Both dereference ctx->codec before calling
coda_alloc_framebuffers() in lines 935 and 1649, so ctx->codec can not
be NULL.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/platform/coda/coda-bit.c