rtc: sc27xx: Remove unnecessary conversion to bool

Here we could use the '!=' expression to fix the following coccicheck
warning:

./drivers/rtc/rtc-sc27xx.c:566:50-55: WARNING: conversion to bool not needed here

Reported-by: Tosk Robot <tencent_os_robot@tencent.com>
Signed-off-by: Kaixu Xia <kaixuxia@tencent.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/1604647854-876-1-git-send-email-kaixuxia@tencent.com
This commit is contained in:
Kaixu Xia 2020-11-06 15:30:54 +08:00 committed by Alexandre Belloni
parent 28d211919e
commit 825156a5ee
1 changed files with 1 additions and 1 deletions

View File

@ -563,7 +563,7 @@ static int sprd_rtc_check_power_down(struct sprd_rtc *rtc)
* means the RTC has been powered down, so the RTC time values are
* invalid.
*/
rtc->valid = val == SPRD_RTC_POWER_RESET_VALUE ? false : true;
rtc->valid = val != SPRD_RTC_POWER_RESET_VALUE;
return 0;
}