linux/drivers/clk/bcm
Dan Carpenter da2edb3e3c clk: bcm: rpi: Fix off by one in raspberrypi_discover_clocks()
Smatch detected an off by one in this code:
    drivers/clk/bcm/clk-raspberrypi.c:374 raspberrypi_discover_clocks()
    error: buffer overflow 'data->hws' 16 <= 16

The data->hws[] array has RPI_FIRMWARE_NUM_CLK_ID elements so the >
comparison needs to changed to >=.

Fixes: 12c90f3f27 ("clk: bcm: rpi: Add variant structure")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/5a850b08-d2f5-4794-aceb-a6b468965139@kili.mountain
Reviewed-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2023-06-14 17:21:00 -07:00
..
clk-bcm63xx-gate.c clk: bcm: Convert to platform remove callback returning void 2023-03-28 19:23:36 -07:00
clk-bcm63xx.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_30.RULE (part 1) 2022-06-10 14:51:35 +02:00
clk-bcm281xx.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_30.RULE (part 1) 2022-06-10 14:51:35 +02:00
clk-bcm2711-dvp.c clk: bcm: Convert to platform remove callback returning void 2023-03-28 19:23:36 -07:00
clk-bcm2835-aux.c kbuild, clk: bcm2835: remove MODULE_LICENSE in non-modules 2023-03-06 11:29:15 -08:00
clk-bcm2835.c kbuild, clk: bcm2835: remove MODULE_LICENSE in non-modules 2023-03-06 11:29:15 -08:00
clk-bcm21664.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_30.RULE (part 1) 2022-06-10 14:51:35 +02:00
clk-bcm53573-ilp.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
clk-bcm63268-timer.c clk: bcm: Add BCM63268 timer clock and reset driver 2023-03-27 13:18:07 -07:00
clk-cygnus.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_30.RULE (part 1) 2022-06-10 14:51:35 +02:00
clk-hr2.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_30.RULE (part 1) 2022-06-10 14:51:35 +02:00
clk-iproc-armpll.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_30.RULE (part 1) 2022-06-10 14:51:35 +02:00
clk-iproc-asiu.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_30.RULE (part 1) 2022-06-10 14:51:35 +02:00
clk-iproc-pll.c clk: iproc: Do not rely on node name for correct PLL setup 2022-09-28 18:33:08 -07:00
clk-iproc.h treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_30.RULE (part 1) 2022-06-10 14:51:35 +02:00
clk-kona-setup.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_30.RULE (part 1) 2022-06-10 14:51:35 +02:00
clk-kona.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_30.RULE (part 1) 2022-06-10 14:51:35 +02:00
clk-kona.h treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_30.RULE (part 1) 2022-06-10 14:51:35 +02:00
clk-ns2.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_30.RULE (part 1) 2022-06-10 14:51:35 +02:00
clk-nsp.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_30.RULE (part 1) 2022-06-10 14:51:35 +02:00
clk-raspberrypi.c clk: bcm: rpi: Fix off by one in raspberrypi_discover_clocks() 2023-06-14 17:21:00 -07:00
clk-sr.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 459 2019-06-19 17:09:09 +02:00
Kconfig clk: bcm: Add BCM63268 timer clock and reset driver 2023-03-27 13:18:07 -07:00
Makefile clk: bcm: Add BCM63268 timer clock and reset driver 2023-03-27 13:18:07 -07:00