]> Git Repo - linux.git/commitdiff
ACPI: remove superfluous NULL pointer check from acpi_processor_get_throttling_info()
authorBartlomiej Zolnierkiewicz <[email protected]>
Tue, 2 Feb 2010 22:37:55 +0000 (14:37 -0800)
committerLen Brown <[email protected]>
Tue, 16 Feb 2010 08:17:41 +0000 (03:17 -0500)
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]>
Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Len Brown <[email protected]>
drivers/acpi/processor_throttling.c

index 1c5d7a8b2fdfc86f2b51e434625fdc497aa099e5..649b2b9b4759d3d29c675cd0cd189c2f4e681b2b 100644 (file)
@@ -1133,9 +1133,6 @@ int acpi_processor_get_throttling_info(struct acpi_processor *pr)
        int 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,
This page took 0.069556 seconds and 4 git commands to generate.