8000 ds1307: Return error code instead of boolean · mcusim/freebsd-src@645a228 · GitHub
[go: up one dir, main page]

Skip to content

Commit 645a228

Browse files
Dmitry SalychevDmitry Salychev
authored andcommitted
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
1 parent 0f996f4 commit 645a228

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sys/dev/iicbus/rtc/ds1307.c

Lines changed: 3 additions & 3 deletions
349
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ mark_epson_time_valid(struct ds1307_softc *sc)
346346
if (error) {
347347
device_printf(dev, "%s cannot read Control 2 register: %d\n",
348348
__func__, error);
-
return (false);
349+
return (error);
350350
}
351351

352352
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)
356356
if (error) {
357357
device_printf(dev, "%s cannot write to Control 2 register: %d\n",
358358
__func__, error);
359-
return (false);
359+
return (error);
360360
}
361-
return (true);
361+
return (0);
362362
}
363363

364364
static bool is_dev_time_valid(struct ds1307_softc *sc)

0 commit comments

Comments
 (0)
0