aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaixu Xia <[email protected]>2020-11-06 16:00:37 +0800
committerAlexandre Belloni <[email protected]>2020-11-14 23:31:33 +0100
commita48c6224ae07bed02893c58073ca2942acb5c3d5 (patch)
tree439437237cb711c3ab5e07182973cf03ab6bc7bb
parent825156a5eeded9bcb55e9c36d4b4b72bf20bcba6 (diff)
rtc: da9063: Simplify bool comparison
Fix the following coccicheck warning: ./drivers/rtc/rtc-da9063.c:246:5-18: WARNING: Comparison to bool Reported-by: Tosk Robot <[email protected]> Signed-off-by: Kaixu Xia <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]> Link: https://lore.kernel.org/r/[email protected]
-rw-r--r--drivers/rtc/rtc-da9063.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/rtc/rtc-da9063.c b/drivers/rtc/rtc-da9063.c
index 046b1d4c3dae..6f0a3a711135 100644
--- a/drivers/rtc/rtc-da9063.c
+++ b/drivers/rtc/rtc-da9063.c
@@ -243,7 +243,7 @@ static int da9063_rtc_read_time(struct device *dev, struct rtc_time *tm)
al_secs = rtc_tm_to_time64(&rtc->alarm_time);
/* handle the rtc synchronisation delay */
- if (rtc->rtc_sync == true && al_secs - tm_secs == 1)
+ if (rtc->rtc_sync && al_secs - tm_secs == 1)
memcpy(tm, &rtc->alarm_time, sizeof(struct rtc_time));
else
rtc->rtc_sync = false;