remarkable-linux/drivers/gpu/ipu-v3
Arnd Bergmann 418c85ea45 gpu: ipu-v3: prg: avoid possible array underflow
[ Upstream commit 746d024c32 ]

gcc-8 reports that we access an array with a negative index
in an error case:

drivers/gpu/ipu-v3/ipu-prg.c: In function 'ipu_prg_channel_disable':
drivers/gpu/ipu-v3/ipu-prg.c:252:43: error: array subscript -22 is below array bounds of 'struct ipu_prg_channel[3]' [-Werror=array-bounds]

This moves the range check in front of the first time that
variable gets used.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-30 07:52:15 +02:00
..
ipu-common.c gpu: ipu-v3: Allow channel burst locking on i.MX6 only 2017-10-11 10:45:06 +02:00
ipu-cpmem.c gpu: ipu-v3: Add support for double read/write reduction 2017-06-08 08:57:18 +02:00
ipu-csi.c gpu: ipu-v3: export ipu_csi_set_downsize 2017-02-17 08:04:27 +01:00
ipu-dc.c gpu: ipu-v3: remove IRQ dance on DC channel disable 2017-03-15 15:28:27 +01:00
ipu-di.c gpu: ipu-di: silence videomode logspam 2016-11-09 10:41:14 +01:00
ipu-dmfc.c gpu: ipu-v3: Do not wait for DMFC FIFO to clear when disabling DMFC channel 2016-08-29 12:45:05 +02:00
ipu-dp.c drm/imx: add deferred plane disabling 2017-03-15 15:42:29 +01:00
ipu-ic.c gpu: ipu-v3: Add ipu_rot_mode_is_irt() 2016-09-19 08:30:14 +02:00
ipu-image-convert.c gpu: ipu-v3: only set non-zero AXI ID for IC when PRG is absent 2017-03-16 10:14:49 +01:00
ipu-pre.c gpu: ipu-v3: pre: fix device node leak in ipu_pre_lookup_by_phandle 2018-05-30 07:51:58 +02:00
ipu-prg.c gpu: ipu-v3: prg: avoid possible array underflow 2018-05-30 07:52:15 +02:00
ipu-prv.h gpu: ipu-v3: remove interrupt busy waiting routine 2017-06-08 08:57:19 +02:00
ipu-smfc.c IPUv3 fixes for v3.18 2014-10-07 14:31:14 +10:00
ipu-vdi.c gpu: ipu-v3: vdic: include AUTO field order bit in ipu_vdi_set_field_order 2017-06-08 08:57:20 +02:00
Kconfig gpu: ipu-v3: add DRM dependency 2017-08-11 10:31:13 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00