From: Jeff Liu <jeff.liu@oracle.com>
To: bhelgaas@google.com
Cc: linux-pci@vger.kernel.org
Subject: [PATCH 13/24] drivers/pci: return actual error on pci_slot_init
Date: Tue, 17 Jun 2014 22:31:24 +0800 [thread overview]
Message-ID: <53A0513C.2070103@oracle.com> (raw)
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(-)
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;
}
--
1.8.3.2
next reply other threads:[~2014-06-17 14:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-17 14:31 Jeff Liu [this message]
2014-06-17 19:23 ` [PATCH 13/24] drivers/pci: return actual error on pci_slot_init Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53A0513C.2070103@oracle.com \
--to=jeff.liu@oracle.com \
--cc=bhelgaas@google.com \
--cc=linux-pci@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox