Re: [PATCH] mfd: mc13xxx: fix a missing check of a register-read failure

2018-12-21 Thread Lee Jones
On Thu, 20 Dec 2018, Kangjie Lu wrote: > When mc13xxx_reg_read() fails, "old_adc0" is uninitialized and will > contain random value. Further execution uses "old_adc0" even when > mc13xxx_reg_read() fails. > The fix checks the return value of mc13xxx_reg_read(), and exits > the execution when it

[PATCH] mfd: mc13xxx: fix a missing check of a register-read failure

2018-12-20 Thread Kangjie Lu
When mc13xxx_reg_read() fails, "old_adc0" is uninitialized and will contain random value. Further execution uses "old_adc0" even when mc13xxx_reg_read() fails. The fix checks the return value of mc13xxx_reg_read(), and exits the execution when it fails. Signed-off-by: Kangjie Lu ---