Message ID | 53A0513C.2070103@oracle.com |
---|---|
State | Rejected |
Headers | show |
On Tue, Jun 17, 2014 at 10:31:24PM +0800, Jeff Liu wrote: > From: Jie Liu <jeff.liu@oracle.com> > > Return the actual error code if call kset_create_and_add() failed > at pci_slot_init(). > > Cc: Bjorn Helgaas <bhelgaas@google.com> > Signed-off-by: Jie Liu <jeff.liu@oracle.com> > --- > drivers/pci/slot.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Bjorn, please do not take this patch. thanks, greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/pci/slot.c b/drivers/pci/slot.c index 396c200..dddb46a 100644 --- a/drivers/pci/slot.c +++ b/drivers/pci/slot.c @@ -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; }