Skip to content

Commit 37aadf9

Browse files
iwamatsu-talexandrebelloni
authored andcommitted
rtc: at91sam9: Remove unnecessary offset variable checks
The offset variable is checked by at91_rtc_readalarm(), but this check is unnecessary because the previous check knew that the value of this variable was not 0. This removes that unnecessary offset variable checks. Cc: Nicolas Ferre <[email protected]> Cc: Ludovic Desroches <[email protected]> Signed-off-by: Nobuhiro Iwamatsu <[email protected]> Acked-by: Nicolas Ferre <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent f2581b1 commit 37aadf9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/rtc/rtc-at91sam9.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ static int at91_rtc_readalarm(struct device *dev, struct rtc_wkalrm *alrm)
184184
return -EILSEQ;
185185

186186
memset(alrm, 0, sizeof(*alrm));
187-
if (alarm != ALARM_DISABLED && offset != 0) {
187+
if (alarm != ALARM_DISABLED) {
188188
rtc_time64_to_tm(offset + alarm, tm);
189189

190190
dev_dbg(dev, "%s: %ptR\n", __func__, tm);

0 commit comments

Comments
 (0)