sparc32: Need to close openned RTC device just like sparc64.
Otherwise we get refcount problems. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
90158d84eb
commit
ab138c031f
@ -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);
|
||||
|
||||
return -1;
|
||||
if (rtc) {
|
||||
err = rtc_set_mmss(rtc, secs);
|
||||
rtc_class_close(rtc);
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user