diff options
author | Arnd Bergmann <arnd@arndb.de> | 2018-03-15 17:19:57 +0100 |
---|---|---|
committer | Philipp Zabel <p.zabel@pengutronix.de> | 2018-03-15 17:52:08 +0100 |
commit | 746d024c3211813946b319411aeb2b47767f8fb0 (patch) | |
tree | 86f0bc1cc53db5a1e462a26f8c4ae005509d9a10 /drivers/fpga/xilinx-spi.c | |
parent | 0c8efd610b58cb23cefdfa12015799079aef94ae (diff) |
gpu: ipu-v3: prg: avoid possible array underflow
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>
Diffstat (limited to 'drivers/fpga/xilinx-spi.c')
0 files changed, 0 insertions, 0 deletions