public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [2.6 patch] drivers/pci/hotplug/cpqphp_core.c: fix a check after use
@ 2005-03-25  0:21 Adrian Bunk
  2005-03-28 23:09 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Adrian Bunk @ 2005-03-25  0:21 UTC (permalink / raw)
  To: greg; +Cc: linux-pci, linux-kernel

This patch fixes a check after use found by the Coverity checker.

Signed-off-by: Adrian Bunk <bunk@stusta.de>

--- linux-2.6.12-rc1-mm1-full/drivers/pci/hotplug/cpqphp_core.c.old	2005-03-23 05:10:34.000000000 +0100
+++ linux-2.6.12-rc1-mm1-full/drivers/pci/hotplug/cpqphp_core.c	2005-03-23 05:10:55.000000000 +0100
@@ -577,11 +577,11 @@ cpqhp_set_attention_status(struct contro
 {
 	u8 hp_slot;
 
-	hp_slot = func->device - ctrl->slot_device_offset;
-
 	if (func == NULL)
 		return(1);
 
+	hp_slot = func->device - ctrl->slot_device_offset;
+
 	// Wait for exclusive access to hardware
 	down(&ctrl->crit_sect);
 


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [2.6 patch] drivers/pci/hotplug/cpqphp_core.c: fix a check after use
  2005-03-25  0:21 [2.6 patch] drivers/pci/hotplug/cpqphp_core.c: fix a check after use Adrian Bunk
@ 2005-03-28 23:09 ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2005-03-28 23:09 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: linux-pci, linux-kernel

On Fri, Mar 25, 2005 at 01:21:55AM +0100, Adrian Bunk wrote:
> This patch fixes a check after use found by the Coverity checker.

Applied, thanks.

greg k-h

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-03-28 23:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-25  0:21 [2.6 patch] drivers/pci/hotplug/cpqphp_core.c: fix a check after use Adrian Bunk
2005-03-28 23:09 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox