diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2016-01-04 16:25:34 +0100 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2016-01-04 16:25:34 +0100 |
commit | 7e935c7ca1e6c398f11edac5beabfc4348e3b3a4 (patch) | |
tree | 86da864ba6341bd86b5f5450c611f918722237b2 /drivers/powercap/intel_rapl.c | |
parent | [mips] switch pvc_proc_cleanup() to remove_proc_subtree() (diff) | |
parent | new helper: memdup_user_nul() (diff) | |
download | linux-7e935c7ca1e6c398f11edac5beabfc4348e3b3a4.tar.xz linux-7e935c7ca1e6c398f11edac5beabfc4348e3b3a4.zip |
Merge branch 'memdup_user_nul' into work.misc
Diffstat (limited to 'drivers/powercap/intel_rapl.c')
-rw-r--r-- | drivers/powercap/intel_rapl.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/powercap/intel_rapl.c b/drivers/powercap/intel_rapl.c index cc97f0869791..48747c28a43d 100644 --- a/drivers/powercap/intel_rapl.c +++ b/drivers/powercap/intel_rapl.c @@ -1341,10 +1341,13 @@ static int rapl_detect_domains(struct rapl_package *rp, int cpu) for (rd = rp->domains; rd < rp->domains + rp->nr_domains; rd++) { /* check if the domain is locked by BIOS */ - if (rapl_read_data_raw(rd, FW_LOCK, false, &locked)) { + ret = rapl_read_data_raw(rd, FW_LOCK, false, &locked); + if (ret) + return ret; + if (locked) { pr_info("RAPL package %d domain %s locked by BIOS\n", rp->id, rd->name); - rd->state |= DOMAIN_STATE_BIOS_LOCKED; + rd->state |= DOMAIN_STATE_BIOS_LOCKED; } } |