1
0
Fork 0

rtc: max8997: Fix the returned value in case of error in 'max8997_rtc_read_alarm()'

In case of error, we return 0.
This is spurious and not consistent with the other functions of the driver.
Propagate the error code instead.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
hifive-unleashed-5.1
Christophe JAILLET 2018-11-14 18:19:51 +01:00 committed by Alexandre Belloni
parent 41c9e132c5
commit 41ef387820
1 changed files with 1 additions and 1 deletions

View File

@ -215,7 +215,7 @@ static int max8997_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm)
out:
mutex_unlock(&info->lock);
return 0;
return ret;
}
static int max8997_rtc_stop_alarm(struct max8997_rtc_info *info)