From: Adrian Bunk This patch fixes a check after use found by the Coverity checker. Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton --- 25-akpm/drivers/pci/hotplug/cpqphp_core.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff -puN drivers/pci/hotplug/cpqphp_core.c~drivers-pci-hotplug-cpqphp_corec-fix-a-check-after-use drivers/pci/hotplug/cpqphp_core.c --- 25/drivers/pci/hotplug/cpqphp_core.c~drivers-pci-hotplug-cpqphp_corec-fix-a-check-after-use Thu Mar 24 17:35:50 2005 +++ 25-akpm/drivers/pci/hotplug/cpqphp_core.c Thu Mar 24 17:35:50 2005 @@ -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); _