Merge branch 'powercap'

* powercap:
  powercap: intel_rapl: add NULL pointer check to rapl_mmio_cpu_online()
This commit is contained in:
Rafael J. Wysocki 2020-01-10 10:58:45 +01:00
commit 10674d97c4

View File

@ -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);