acpi: remove superfluous NULL pointer check from acpi_processor_get_throttling_info()
PATCH 3/7 acpi: remove superfluous NULL pointer check from acpi_processor_get_throttling_info()
From: Bartlomiej Zolnierkiewicz <[email protected]>
Dan's list contains:
drivers/acpi/processor_throttling.c +1139 acpi_processor_get_throttling_info(11) warning: variable derefenced before check 'pr'
acpi_processor_get_throttling_info() is never called with pr == NULL.
[ bart: the potential NULL pointer dereference was finally fixed in
(much later than mine) commit 5cfa245 but my patch is still valid ]
Reported-by Dan Carpenter <[email protected]>
Cc Jonathan Corbet <[email protected]>
Cc Eugene Teo <[email protected]>
Signed-off-by Bartlomiej Zolnierkiewicz <[email protected]>
Cc Len Brown <[email protected]>
Cc Lin Ming <[email protected]>
Cc Bob Moore <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
drivers/acpi/processor_throttling.c | 3 --- 1 file changed, 3 deletions(-)
drivers/acpi/processor_throttling.c renamed from drivers/acpi/processor_throttling.c~acpi-remove-superfluous-null-pointer-check-from-acpi_processor_get_throttling_info +0 -3
@@ -1133,9 +1133,6 @@ int acpi_processor_get_throttling_info(sint result =0 ;struct acpi_processor_throttling *pthrottling; -if (!pr) -return -EINVAL ; - ACPI_DEBUG_PRINT((ACPI_DB_INFO, "pblk_address[0x%08x] duty_offset[%d] duty_width[%d]\n", pr->throttling.address,
_
Len Brown
reviewerapplied to acpi-test
thanks,
Len Brown, Intel Open Source Technology Center