All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH resend] acpi: remove superfluous NULL pointer check from acpi_processor_get_throttling_info()
@ 2010-01-05 19:17 Bartlomiej Zolnierkiewicz
  0 siblings, 0 replies; only message in thread
From: Bartlomiej Zolnierkiewicz @ 2010-01-05 19:17 UTC (permalink / raw)
  To: Len Brown
  Cc: linux-acpi, Dan Carpenter, Jonathan Corbet, Eugene Teo,
	Andrew Morton

>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.

[ 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 <error27@gmail.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Eugene Teo <eteo@redhat.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
 drivers/acpi/processor_throttling.c |    3 ---
 1 file changed, 3 deletions(-)

Index: b/drivers/acpi/processor_throttling.c
===================================================================
--- a/drivers/acpi/processor_throttling.c
+++ b/drivers/acpi/processor_throttling.c
@@ -1133,9 +1133,6 @@ int acpi_processor_get_throttling_info(s
 	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,

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-01-05 19:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-05 19:17 [PATCH resend] acpi: remove superfluous NULL pointer check from acpi_processor_get_throttling_info() Bartlomiej Zolnierkiewicz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.