]> git.baikalelectronics.ru Git - kernel.git/commit
power: supply: bq25980: Fix uninitialized wd_reg_val and overrun
authorDan Murphy <dmurphy@ti.com>
Fri, 9 Oct 2020 12:12:05 +0000 (07:12 -0500)
committerSebastian Reichel <sre@kernel.org>
Tue, 13 Oct 2020 21:24:10 +0000 (23:24 +0200)
commit09bf625cce48ea9d54178787682c0ca44f040ca4
treeb533b2595e73fc560f974b93790f824666c1a4af
parente7908a9e9d3eaf9e828569e544250ee0d8105d8b
power: supply: bq25980: Fix uninitialized wd_reg_val and overrun

Fix the issue when 'i' is equal to array size then array index over
runs the array when checking for the watch dog value.

Fixes: 0ecfa7b8b161 ("power: supply: bq25980: Add support for the BQ259xx family")
Signed-off-by: Dan Murphy <dmurphy@ti.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/bq25980_charger.c