Skip to contentSkip to conversation

drivers/pci/hotplug/cpqphp_core.c: fix a check after use

PATCH Applied Adrian Bunk 2 participants 2 messages Mar 25, 2005 – Mar 28, 2005 PCI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers/pci/hotplug/cpqphp_core.c: fix a check after use

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

drivers/pci/hotplug/cpqphp_core.c renamed from drivers/pci/hotplug/cpqphp_core.c.old +2 -2
@@ -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);
 
Applied
#1 lore raw
Quoted 1 line · Adrian Bunk

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

Applied, thanks.

greg k-h