summaryrefslogtreecommitdiff
path: root/ipc
diff options
context:
space:
mode:
authorJacob Pan <jacob.jun.pan@linux.intel.com>2016-11-28 21:53:11 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-01-19 19:18:07 (GMT)
commitaa3ee06a2ae2fe7b7b65fc9a82d52b96f99ab1d6 (patch)
treec8da44bd7659bd863ba4185b66c7cfbf7d7eb404 /ipc
parentf53cfb081f000bb07f838515bf090a9d7d9047c6 (diff)
downloadlinux-aa3ee06a2ae2fe7b7b65fc9a82d52b96f99ab1d6.tar.xz
powercap/intel_rapl: fix and tidy up error handling
commit cb43f81b8489dcb87555e16c17453f0a9fa690f2 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'ipc')
0 files changed, 0 insertions, 0 deletions