From 67a69cdd748de32d9991056c207f7ab3798230a5 Mon Sep 17 00:00:00 2001 From: "alexn@dsv.su.se" Date: Sat, 12 Mar 2005 21:43:53 -0800 Subject: [PATCH] [PATCH] PCI: fix hotplug double free [PATCH] PCI: fix hotplug double free With the brackets missed out func could be freed twice. Found by Coverity tool Signed-off-by: Alexander Nyberg Signed-off-by: Greg Kroah-Hartman --- drivers/pci/hotplug/pciehp_ctrl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/pci/hotplug/pciehp_ctrl.c b/drivers/pci/hotplug/pciehp_ctrl.c index 279f53d78608d..0dbcf04aa35e4 100644 --- a/drivers/pci/hotplug/pciehp_ctrl.c +++ b/drivers/pci/hotplug/pciehp_ctrl.c @@ -1354,10 +1354,11 @@ static u32 remove_board(struct pci_func *func, struct controller *ctrl) dbg("PCI Bridge Hot-Remove s:b:d:f(%02x:%02x:%02x:%02x)\n", ctrl->seg, func->bus, func->device, func->function); bridge_slot_remove(func); - } else + } else { dbg("PCI Function Hot-Remove s:b:d:f(%02x:%02x:%02x:%02x)\n", ctrl->seg, func->bus, func->device, func->function); slot_remove(func); + } func = pciehp_slot_find(ctrl->slot_bus, device, 0); } -- 2.47.2