Skip to content

Commit

Permalink
rtc: max8925: remove redundant check on ret
Browse files Browse the repository at this point in the history
The check on ret < 0 is redundant as the goto destination is the
next statment.  Remove this redudant check and goto.

Detected by CoverityScan, CID#1268785 ("Identical code for different
branches")

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
  • Loading branch information
Colin Ian King authored and Alexandre Belloni committed Jul 30, 2017
1 parent 1a37c34 commit 2f7f1b7
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/rtc/rtc-max8925.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,6 @@ static int max8925_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm)
ret = max8925_reg_write(info->rtc, MAX8925_ALARM0_CNTL, 0x77);
else
ret = max8925_reg_write(info->rtc, MAX8925_ALARM0_CNTL, 0x0);
if (ret < 0)
goto out;
out:
return ret;
}
Expand Down

0 comments on commit 2f7f1b7

Please sign in to comment.