]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
powercap: intel_rapl: Change an error pointer to NULL
authorDan Carpenter <dan.carpenter@linaro.org>
Fri, 23 Aug 2024 12:51:36 +0000 (15:51 +0300)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 23 Aug 2024 13:45:17 +0000 (15:45 +0200)
commit6b08b4ee5e60d8789aeb87250f718ef14bebb90e
tree5e6e2e1be5020353e07948375accd319f8c485cb
parent95f6580352a7225e619551febb83595bcb77ab17
powercap: intel_rapl: Change an error pointer to NULL

The rapl_find_package_domain_cpuslocked() function is supposed to
return NULL on error.

This new error patch returns ERR_PTR(-EINVAL) but none of the callers
check for that so it would lead to an Oops.

Fixes: 26096aed255f ("powercap/intel_rapl: Fix the energy-pkg event for AMD CPUs")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://patch.msgid.link/fa719c6a-8d3b-4cca-9b43-bcd477ff6655@stanley.mountain
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/powercap/intel_rapl_common.c