]> git.baikalelectronics.ru Git - kernel.git/commit
rtc: rv3029: revert error handling patch to rv3029_eeprom_write()
authorDan Carpenter <dan.carpenter@oracle.com>
Sat, 17 Aug 2019 06:56:04 +0000 (09:56 +0300)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Wed, 21 Aug 2019 07:57:23 +0000 (09:57 +0200)
commit8eb9273290111573c3ef18bb0ebfd1f3e6628904
treeba47b9dfdc744ccfbf00ffc09f8b642887575232
parent06c0cf6a306eb75d767ee88d93e00e85abd1afd8
rtc: rv3029: revert error handling patch to rv3029_eeprom_write()

My error handling "cleanup" was totally wrong.  Both the "err" and "ret"
variables are required.  The "err" variable holds the error codes for
rv3029_eeprom_enter/exit() and the "ret" variable holds the error codes
for if actual write fails.  In my patch if the write failed, the
function probably still returned success.

Reported-by: Tom Evans <tom.evans@motec.com.au>
Fixes: 491f84c3e9cd ("rtc: rv3029: Clean up error handling in rv3029_eeprom_write()")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20190817065604.GB29951@mwanda
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/rtc-rv3029c2.c