diff options
author | Su Hui <suhui@nfschina.com> | 2023-11-16 12:18:23 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-01-25 15:27:45 -0800 |
commit | e6fce099c9b4895ee67c53f021ca99da07f7a134 (patch) | |
tree | f3809ea33e54a5c7cf36b3758353ce4b12e5c1df /drivers/base/node.c | |
parent | ddd3fe99b4fa65c5cb78a6076fb4be5bff431c25 (diff) |
power: supply: bq256xx: fix some problem in bq256xx_hw_init
[ Upstream commit b55d073e6501dc6077edaa945a6dad8ac5c8bbab ]
smatch complains that there is a buffer overflow and clang complains
'ret' is never read.
Smatch error:
drivers/power/supply/bq256xx_charger.c:1578 bq256xx_hw_init() error:
buffer overflow 'bq256xx_watchdog_time' 4 <= 4
Clang static checker:
Value stored to 'ret' is never read.
Add check for buffer overflow and error code from regmap_update_bits().
Fixes: 32e4978bb920 ("power: supply: bq256xx: Introduce the BQ256XX charger driver")
Signed-off-by: Su Hui <suhui@nfschina.com>
Link: https://lore.kernel.org/r/20231116041822.1378758-1-suhui@nfschina.com
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/base/node.c')
0 files changed, 0 insertions, 0 deletions