PCI: Simplify pci_create_slot() logic
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Fri, 4 Oct 2024 15:22:40 +0000 (18:22 +0300)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 4 Oct 2024 22:02:00 +0000 (17:02 -0500)
commit3ca258994b32c486b0ed59307ec31ee413524598
treead08710b0cfb66bc080a7a032dde0675d33b190a
parent2985b1844f3f3447f2d938eff1ef6762592065a5
PCI: Simplify pci_create_slot() logic

Simplify pci_create_slot() by splitting an "if" statement into two parts.
In order to not duplicate error handling, add a new label to handle kobj
put.

Link: https://lore.kernel.org/r/20241004152240.7926-1-ilpo.jarvinen@linux.intel.com
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/slot.c