Index: uspace/drv/time/cmos-rtc/cmos-rtc.c
===================================================================
--- uspace/drv/time/cmos-rtc/cmos-rtc.c	(revision b801f2d6becda84795177e84564a610b886dbea0)
+++ uspace/drv/time/cmos-rtc/cmos-rtc.c	(revision f220e25ced65f6914f802dba7020702c0529ef51)
@@ -410,10 +410,16 @@
 	/* Try to normalize the content of the tm structure */
 	time_t r = mktime(t);
-
-	rtc->boottime = r - uptime_get();
+	int result;
+
+	if (r < 0)
+		result = EINVAL;
+	else {
+		rtc->boottime = r - uptime_get();
+		result = EOK;
+	}
 
 	fibril_mutex_unlock(&rtc->mutex);
 
-	return r < 0 ? EINVAL : EOK;
+	return result;
 }
 
