Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1659925
| From | Colin King <colin.king@canonical.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] rtc: rtc-max8925: remove redundant check on ret |
| Date | 2017-06-07 17:30 +0200 |
| Message-ID | <tPL4e-8ou-17@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
From: Colin Ian King <colin.king@canonical.com>
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>
---
drivers/rtc/rtc-max8925.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/rtc/rtc-max8925.c b/drivers/rtc/rtc-max8925.c
index 16d129a0bb3b..67d6fc2d23e6 100644
--- a/drivers/rtc/rtc-max8925.c
+++ b/drivers/rtc/rtc-max8925.c
@@ -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;
}
--
2.11.0
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] rtc: rtc-max8925: remove redundant check on ret Colin King <colin.king@canonical.com> - 2017-06-07 17:30 +0200 Re: [PATCH] rtc: rtc-max8925: remove redundant check on ret Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-06-08 03:40 +0200
csiph-web