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

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
......@@ -337,9 +337,12 @@ static int sbus_do_settimeofday(struct timespec *tv)
static int set_rtc_mmss(unsigned long secs)
{
struct rtc_device *rtc = rtc_class_open("rtc0");
int err = -1;
if (rtc)
return rtc_set_mmss(rtc, secs);
if (rtc) {
err = rtc_set_mmss(rtc, secs);
rtc_class_close(rtc);
}
return -1;
return err;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment