ds1307: Return error code instead of boolean

It's probably a copy-paste leftover from the other functions which
return a boolean value and generates annoying "CLOCK_SETTIME error 1"
from subr_rtc.c on Traverse Ten64 in verbose mode.

No functional changes intended.

MFC after:	3 days
This commit is contained in:
Dmitry Salychev 2024-06-03 15:41:11 +02:00
parent 0f996f4541
commit 645a228481
No known key found for this signature in database
GPG key ID: CEDA4464564B041D

View file

@ -346,7 +346,7 @@ mark_epson_time_valid(struct ds1307_softc *sc)
if (error) {
device_printf(dev, "%s cannot read Control 2 register: %d\n",
__func__, error);
return (false);
return (error);
}
control_mask = (RX8035_CTRL_2_PON | RX8035_CTRL_2_XSTP | RX8035_CTRL_2_VDET);
@ -356,9 +356,9 @@ mark_epson_time_valid(struct ds1307_softc *sc)
if (error) {
device_printf(dev, "%s cannot write to Control 2 register: %d\n",
__func__, error);
return (false);
return (error);
}
return (true);
return (0);
}
static bool is_dev_time_valid(struct ds1307_softc *sc)