提交 2f7f1b78 编写于 作者: C Colin Ian King 提交者: Alexandre Belloni

rtc: max8925: remove redundant check on ret

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: NColin Ian King <colin.king@canonical.com>
Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
上级 1a37c348
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册