drivers: rtc: resolve year 2038 problem in rtc_to_tm

Our implementation of rtc_to_tm() cannot handle dates of more than
0x7fffffff seconds after 1970-01-01.

Adopt the Linux kernel implementation.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
diff --git a/drivers/rtc/i2c_rtc_emul.c b/drivers/rtc/i2c_rtc_emul.c
index bad61c3..d4b33e5 100644
--- a/drivers/rtc/i2c_rtc_emul.c
+++ b/drivers/rtc/i2c_rtc_emul.c
@@ -96,7 +96,9 @@
 		now = plat->base_time;
 	}
 
-	return rtc_to_tm(now + plat->offset, time);
+	rtc_to_tm(now + plat->offset, time);
+
+	return 0;
 }
 
 static int sandbox_i2c_rtc_set(struct udevice *dev, const struct rtc_time *time)