]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
We forget to save the return value of the call to
authorJesper Juhl <jj@chaosbits.net>
Sat, 16 Jul 2011 13:31:15 +0000 (23:31 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 26 Jul 2011 05:05:22 +0000 (15:05 +1000)
twl_rtc_write_u8(save_control, REG_RTC_CTRL_REG); in 'ret', making the
test of 'ret < 0' dead code since 'ret' then couldn't possibly have
changed since the last test just a few lines above.  It also makes us not
detect failures from that specific twl_rtc_write_u8() call.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Alexandre Rusev <source@mvista.com>
Cc: "George G. Davis" <gdavis@mvista.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/rtc/rtc-twl.c

index f9a2799c44d6e177f154f23f938acb8de47db208..9a81f778d6b22216469b641d0dbe44c809667fd8 100644 (file)
@@ -275,7 +275,7 @@ static int twl_rtc_set_time(struct device *dev, struct rtc_time *tm)
                goto out;
 
        save_control &= ~BIT_RTC_CTRL_REG_STOP_RTC_M;
-       twl_rtc_write_u8(save_control, REG_RTC_CTRL_REG);
+       ret = twl_rtc_write_u8(save_control, REG_RTC_CTRL_REG);
        if (ret < 0)
                goto out;