mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 12:42:02 +00:00
Merge branch 'powercap'
* powercap: powercap: intel_rapl: add NULL pointer check to rapl_mmio_cpu_online()
This commit is contained in:
commit
10674d97c4
@ -1295,6 +1295,9 @@ struct rapl_package *rapl_add_package(int cpu, struct rapl_if_priv *priv)
|
||||
struct cpuinfo_x86 *c = &cpu_data(cpu);
|
||||
int ret;
|
||||
|
||||
if (!rapl_defaults)
|
||||
return ERR_PTR(-ENODEV);
|
||||
|
||||
rp = kzalloc(sizeof(struct rapl_package), GFP_KERNEL);
|
||||
if (!rp)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
Loading…
Reference in New Issue
Block a user