linux_old1/drivers/powercap
Dan Carpenter 216c4e9db4 PowerCap: Fix an error code in powercap_register_zone()
In the current code we accidentally return the successful result from
idr_alloc() instead of a negative error pointer.  The caller is looking
for an error pointer and so it treats the returned value as a valid
pointer.

This one might be a bit serious because if it lets people get around the
kernel's protection for remapping NULL.  I'm not sure.

Fixes: 75d2364ea0 (PowerCap: Add class driver)
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2017-05-14 13:30:05 +02:00
..
Kconfig powercap / RAPL: fix build dependency on iosf_mbi 2014-11-12 21:09:19 +01:00
Makefile
intel_rapl.c powercap: intel_rapl: Add support for Gemini Lake 2017-04-28 23:56:16 +02:00
powercap_sys.c PowerCap: Fix an error code in powercap_register_zone() 2017-05-14 13:30:05 +02:00