Commit 9e7e5ae0 authored by Dave Jones's avatar Dave Jones Committed by Linus Torvalds

[PATCH] PCI Hotplug: Use before NULL check in shpchp_ctrl

More fun found with the coverity checker.
Signed-off-by: default avatarDave Jones <davej@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent ea7f7a07
......@@ -2163,12 +2163,14 @@ int shpchp_disable_slot (struct slot *p_slot)
u32 rc = 0;
int ret = 0;
unsigned int devfn;
struct pci_bus *pci_bus = p_slot->ctrl->pci_dev->subordinate;
struct pci_bus *pci_bus;
struct pci_func *func;
if (!p_slot->ctrl)
return 1;
pci_bus = p_slot->ctrl->pci_dev->subordinate;
/* Check to see if (latch closed, card present, power on) */
down(&p_slot->ctrl->crit_sect);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment