Merge branches 'pm-tools-fixes' and 'pm-sleep-fixes'
* pm-tools-fixes: cpupower: Correct return type of cpu_power_is_cpu_online() in cpufreq-set * pm-sleep-fixes: PM / sleep: don't suspend parent when async child suspend_{noirq, late} fails PM / sleep: fix device reference leak in test_suspend
This commit is contained in:
@@ -203,8 +203,10 @@ static int __init test_suspend(void)
|
||||
|
||||
/* RTCs have initialized by now too ... can we use one? */
|
||||
dev = class_find_device(rtc_class, NULL, NULL, has_wakealarm);
|
||||
if (dev)
|
||||
if (dev) {
|
||||
rtc = rtc_class_open(dev_name(dev));
|
||||
put_device(dev);
|
||||
}
|
||||
if (!rtc) {
|
||||
printk(warn_no_rtc);
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user