]> git.baikalelectronics.ru Git - kernel.git/commit
power: supply: bq25890_charger: fix incorrect error return when bq25890_field_read...
authorColin Ian King <colin.king@canonical.com>
Thu, 16 Jan 2020 17:09:00 +0000 (17:09 +0000)
committerSebastian Reichel <sre@kernel.org>
Thu, 16 Jan 2020 19:35:57 +0000 (20:35 +0100)
commit5b27e36dc58fd25efafc6e01a67ad72571215512
tree85ec2dbbc346e1f9cd5d4f50f2b1420aa537e311
parent118a5a998d62cf69e9414ec9929f83f51b4b8f9d
power: supply: bq25890_charger: fix incorrect error return when bq25890_field_read fails

Currently a read failure by bq25890_field_read on F_DEV_REV is returning
an error in id instead of rev. Fix this by returning the value in rev.

Addresses-Coverity: ("Copy-paste error")
Fixes: 162d144d2ee7 ("power: supply: bq25890_charger: Add support of BQ25892 and BQ25896 chips")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/bq25890_charger.c