Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ab138c03 authored by David S. Miller's avatar David S. Miller
Browse files

sparc32: Need to close openned RTC device just like sparc64.



Otherwise we get refcount problems.

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 90158d84
Loading
Loading
Loading
Loading
+6 −3
Original line number Original line Diff line number Diff line
@@ -337,9 +337,12 @@ static int sbus_do_settimeofday(struct timespec *tv)
static int set_rtc_mmss(unsigned long secs)
static int set_rtc_mmss(unsigned long secs)
{
{
	struct rtc_device *rtc = rtc_class_open("rtc0");
	struct rtc_device *rtc = rtc_class_open("rtc0");
	int err = -1;


	if (rtc)
	if (rtc) {
		return rtc_set_mmss(rtc, secs);
		err = rtc_set_mmss(rtc, secs);
		rtc_class_close(rtc);
	}


	return -1;
	return err;
}
}