drivers/pci: return actual error on pci_slot_init
PATCH 13/24 drivers/pci: return actual error on pci_slot_init
From: Jie Liu <[email protected]>
Return the actual error code if call kset_create_and_add() failed at pci_slot_init().
Cc Bjorn Helgaas <[email protected]>
Signed-off-by Jie Liu <[email protected]>
--- drivers/pci/slot.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/pci/slot.c +2 -2
@@ -387,9 +387,9 @@ static int pci_slot_init(void) pci_bus_kset =bus_get_kset (&pci_bus_type); pci_slots_kset =kset_create_and_add ("slots" ,NULL , &pci_bus_kset->kobj); -if (!pci_slots_kset) { +if (IS_ERR (pci_slots_kset)) {printk (KERN_ERR "PCI: Slot initialization failure\n" ); -return -ENOMEM ; +return PTR_ERR (pci_slots_kset); }return 0 ; }
Signature · 1 line
1.8.3.2
Quoted 10 lines · Jeff Liu
From: Jie Liu <[email protected]>
Return the actual error code if call
kset_create_and_add()failed atpci_slot_init().Cc Bjorn Helgaas <[email protected]>Signed-off-by Jie Liu <[email protected]>--- drivers/pci/slot.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Bjorn, please do not take this patch.
thanks,
greg k-h