]> asedeno.scripts.mit.edu Git - linux.git/commit
power: twl4030: fix a missing check of return value
authorKangjie Lu <kjlu@umn.edu>
Thu, 20 Dec 2018 19:51:24 +0000 (13:51 -0600)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Sun, 20 Jan 2019 21:38:35 +0000 (22:38 +0100)
commit6f12e46eebf1a7d4fdd66df5e815df96b8f8b1b5
tree3ab79ed9bac528edf0c60f0f97fd6bf6d74e9611
parent3dcdb68925b82a9fe89b28bd66a8c12d8c3804a0
power: twl4030: fix a missing check of return value

If twl4030_bci_read() fails, the read data in "s" is incorrect,
which is however used in the following execution. The fix checks
the return value of twl4030_bci_read() and returns an error code
upstream upon the failure of twl4030_bci_read().

Signed-off-by: Kangjie Lu <kjlu@umn.edu>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/twl4030_charger.c