diff options
author | Jacob Pan <jacob.jun.pan@linux.intel.com> | 2016-11-28 22:53:11 +0100 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-11-29 00:02:29 +0100 |
commit | cb43f81b8489dcb87555e16c17453f0a9fa690f2 (patch) | |
tree | c2adf0174613051b37795eda564ef537dada9727 /.cocciconfig | |
parent | powercap/intel_rapl: Track active CPUs internally (diff) | |
download | linux-cb43f81b8489dcb87555e16c17453f0a9fa690f2.tar.xz linux-cb43f81b8489dcb87555e16c17453f0a9fa690f2.zip |
powercap/intel_rapl: fix and tidy up error handling
Commit e1399ba20eee ("powercap / RAPL: handle missing MSRs") added
contraint_to_pl() function to return index into an array. But it
can potentially return -EINVAL if powercap layer sends an out of
range constraint ID. This patch adds sanity check.
Unnecessary RAPL domain pointer check is removed since it must be
initialized before calling rapl_unit_xlate().
Fixes: e1399ba20eee ("powercap / RAPL: handle missing MSRs")
Reported-by: Odzioba, Lukasz <lukasz.odzioba@intel.com>
Reported-by: Koss, Marcin <marcin.koss@intel.com>
Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to '.cocciconfig')
0 files changed, 0 insertions, 0 deletions