]> git.baikalelectronics.ru Git - kernel.git/commit
media: rcar-dma: p_set can't be NULL
authorMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Mon, 25 Mar 2019 20:47:13 +0000 (16:47 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Mon, 25 Mar 2019 22:02:31 +0000 (18:02 -0400)
commitee5f35bd8bcb26d873698b8736dd75d2fdade3f9
tree857108cc55327381872bc4b4bea3a238d76d27e3
parent242dd6e9587e35d49dad2d43f2cdd9c8f99d4d16
media: rcar-dma: p_set can't be NULL

The only way for p_set to be NULL would be if vin_coef_set would be an
empty array.

On such case, the driver will OOPS, as it would try to de-reference a
NULL value. So, the check if p_set is not NULL doesn't make any sense.

Solves those two smatch warnings:

drivers/media/platform/rcar-vin/rcar-dma.c:489 rvin_set_coeff() warn: variable dereferenced before check 'p_set' (see line 484)
drivers/media/platform/rcar-vin/rcar-dma.c:494 rvin_set_coeff() error: we previously assumed 'p_set' could be null (see line 489)

Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/platform/rcar-vin/rcar-dma.c