We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4ff0bf6 commit 822c790Copy full SHA for 822c790
arch/x86/kernel/cpu/umwait.c
@@ -232,7 +232,11 @@ static int __init umwait_init(void)
232
* Add umwait control interface. Ignore failure, so at least the
233
* default values are set up in case the machine manages to boot.
234
*/
235
- dev = cpu_subsys.dev_root;
236
- return sysfs_create_group(&dev->kobj, &umwait_attr_group);
+ dev = bus_get_dev_root(&cpu_subsys);
+ if (dev) {
237
+ ret = sysfs_create_group(&dev->kobj, &umwait_attr_group);
238
+ put_device(dev);
239
+ }
240
+ return ret;
241
}
242
device_initcall(umwait_init);
0 commit comments