summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/sh_vou.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-06-10 11:53:45 +0200
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-06-17 09:29:41 +0200
commit128916984208d8f7ccaed6eda840c603fa112910 (patch)
treeb93833776e0e0abc02591b067eedafed423a7800 /drivers/media/platform/sh_vou.c
parent60f0618d157b8c8bf1d09d4a6e10070a0b580160 (diff)
downloadlinux-stable-128916984208d8f7ccaed6eda840c603fa112910.tar.gz
linux-stable-128916984208d8f7ccaed6eda840c603fa112910.tar.bz2
linux-stable-128916984208d8f7ccaed6eda840c603fa112910.zip
media: xilinx: simplify get fourcc logic
Right now, there are two calls for xvip_get_format_by_fourcc(). If the first one fails, it is called again in order to pick the first available format: V4L2_PIX_FMT_YUYV. This ends by producing a smatch warnings: drivers/media/platform/xilinx/xilinx-dma.c:555 __xvip_dma_try_format() error: 'info' dereferencing possible ERR_PTR() drivers/media/platform/xilinx/xilinx-dma.c: drivers/media/platform/xilinx/xilinx-dma.c:664 xvip_dma_init() error: 'dma->fmtinfo' dereferencing possible ERR_PTR() as it is hard for an static analyzer to ensure that calling xvip_get_format_by_fourcc(XVIP_DMA_DEF_FORMAT) won't return an error. So, better to optimize the logic, ensuring that the function will never return an error. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/platform/sh_vou.c')
0 files changed, 0 insertions, 0 deletions