Skip to contentSkip to conversation

acpi: remove superfluous NULL pointer check from acpi_processor_get_throttling_info()

PATCH Superseded Bartlomiej Zolnierkiewicz 1 participant 1 message Jul 25, 2009 ACPI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 acpi: remove superfluous NULL pointer check from acpi_processor_get_throttling_info()

From: Bartlomiej Zolnierkiewicz <[email protected]>
Subject: [PATCH] acpi: remove superfluous NULL pointer check from acpi_processor_get_throttling_info()

Quoted 1 line

From Dan's list:

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.

---
 drivers/acpi/processor_throttling.c |    3 ---
 1 file changed, 3 deletions(-)
drivers/acpi/processor_throttling.c +0 -3
Index: b/drivers/acpi/processor_throttling.c
===================================================================
@@ -1135,9 +1135,6 @@ int acpi_processor_get_throttling_info(s
 			  pr->throttling.duty_offset,
 			  pr->throttling.duty_width));
 
-	if (!pr)
-		return -EINVAL;
-
 	/*
 	 * Evaluate _PTC, _TSS and _TPC
 	 * They must all be present or none of them can be used.