Commit 8af4bd79 authored by Alexander Nyberg's avatar Alexander Nyberg Committed by Greg Kroah-Hartman

[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: default avatarAlexander Nyberg <alexn@dsv.su.se>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent cf3e7eab
......@@ -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);
}
......
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