Lukas Wunner 4ce6435820 PCI: hotplug: Don't leak pci_slot on registration failure
If addition of sysfs files fails on registration of a hotplug slot, the
struct pci_slot as well as the entry in the slot_list is leaked.  The
issue has been present since the hotplug core was introduced in 2002:
https://git.kernel.org/tglx/history/c/a8a2069f432c

Perhaps the idea was that even though sysfs addition fails, the slot
should still be usable.  But that's not how drivers use the interface,
they abort probe if a non-zero value is returned.

Signed-off-by: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Cc: stable@vger.kernel.org # v2.4.15+
Cc: Greg Kroah-Hartman <greg@kroah.com>
2018-07-23 17:04:10 -05:00
..
2018-04-04 13:28:40 -05:00
2018-05-10 17:56:02 -05:00
2018-05-09 06:57:18 +02:00
2018-03-19 14:20:43 -05:00
2018-01-18 12:55:24 -06:00
2018-03-19 14:20:43 -05:00
2018-06-12 16:19:22 -07:00
2018-06-07 12:45:58 -07:00
2018-03-19 14:20:43 -05:00
2018-03-19 14:20:43 -05:00
2018-06-12 16:19:22 -07:00
2018-06-07 12:45:58 -07:00
2018-06-06 16:10:27 -05:00
2018-06-06 16:10:18 -05:00
2018-05-16 07:23:35 +02:00
2018-06-06 16:10:51 -05:00
2018-03-19 14:20:43 -05:00
2018-03-19 14:20:43 -05:00
2018-03-19 14:20:43 -05:00
2018-04-04 13:27:45 -05:00
2018-03-19 14:20:43 -05:00
2018-02-01 11:40:07 -06:00
2018-04-06 18:31:06 -07:00
2018-03-19 14:20:43 -05:00