From: Colin King <colin.king@canonical.com>
To: Alessandro Zummo <a.zummo@towertech.it>,
Alexandre Belloni <alexandre.belloni@free-electrons.com>,
linux-rtc@vger.kernel.org
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] rtc: rtc-max8925: remove redundant check on ret
Date: Wed, 7 Jun 2017 16:26:15 +0100 [thread overview]
Message-ID: <20170607152615.2072-1-colin.king@canonical.com> (raw)
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
next reply other threads:[~2017-06-07 15:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-07 15:26 Colin King [this message]
2017-06-08 1:37 ` [PATCH] rtc: rtc-max8925: remove redundant check on ret Andy Shevchenko
2017-07-30 15:06 ` Alexandre Belloni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170607152615.2072-1-colin.king@canonical.com \
--to=colin.king@canonical.com \
--cc=a.zummo@towertech.it \
--cc=alexandre.belloni@free-electrons.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox