]> git.baikalelectronics.ru Git - kernel.git/commit
power: supply: bq256xx: Fix BQ256XX_NUM_WD_VAL and bq256xx_watchdog_time[] overrun
authorRicardo Rivera-Matos <r-rivera-matos@ti.com>
Wed, 13 Jan 2021 22:53:52 +0000 (16:53 -0600)
committerSebastian Reichel <sre@kernel.org>
Thu, 14 Jan 2021 22:38:56 +0000 (23:38 +0100)
commitf05724c7bdd81ab97a2e46cde8eed9ba48a94079
tree628f48c8d5f43a0c2a62330c8fd7b90ec70cf4cd
parent0c45369dd433b6b7f90c1a1864dee18329bc1a30
power: supply: bq256xx: Fix BQ256XX_NUM_WD_VAL and bq256xx_watchdog_time[] overrun

Corrects BQ256XX_NUM_WD_VAL from value of "8" to "4" and fixes the issue when 'i'
is equal to array size then array index over runs the array

Fixes: 4e4da28a357d ("power: supply: bq256xx: Introduce the BQ256XX charger driver")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Ricardo Rivera-Matos <r-rivera-matos@ti.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/bq256xx_charger.c