aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/slot.c
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2013-04-12 13:35:40 -0400
committerBjorn Helgaas <bhelgaas@google.com>2013-04-17 12:21:12 -0400
commit9fc9eea09f518b9bbdc0a14ef668698c913ba614 (patch)
tree3e1b6cb29f75de5b9a0aa1db371a6fc3332d2d07 /drivers/pci/slot.c
parentd67aed63b8bfa4a06575ed578328b02f909699ee (diff)
PCI: Warn about failures instead of "must_check" functions
These places capture return values to avoid "must_check" warnings, but we didn't *do* anything with the return values, which causes "set but not used" warnings. We might as well do something instead of just trying to evade the "must_check" warnings. Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/slot.c')
-rw-r--r--drivers/pci/slot.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/pci/slot.c b/drivers/pci/slot.c
index ac6412fb8d6f..c1e9284a677b 100644
--- a/drivers/pci/slot.c
+++ b/drivers/pci/slot.c
@@ -377,14 +377,17 @@ void pci_hp_create_module_link(struct pci_slot *pci_slot)
377{ 377{
378 struct hotplug_slot *slot = pci_slot->hotplug; 378 struct hotplug_slot *slot = pci_slot->hotplug;
379 struct kobject *kobj = NULL; 379 struct kobject *kobj = NULL;
380 int no_warn; 380 int ret;
381 381
382 if (!slot || !slot->ops) 382 if (!slot || !slot->ops)
383 return; 383 return;
384 kobj = kset_find_obj(module_kset, slot->ops->mod_name); 384 kobj = kset_find_obj(module_kset, slot->ops->mod_name);
385 if (!kobj) 385 if (!kobj)
386 return; 386 return;
387 no_warn = sysfs_create_link(&pci_slot->kobj, kobj, "module"); 387 ret = sysfs_create_link(&pci_slot->kobj, kobj, "module");
388 if (ret)
389 dev_err(&pci_slot->bus->dev, "Error creating sysfs link (%d)\n",
390 ret);
388 kobject_put(kobj); 391 kobject_put(kobj);
389} 392}
390EXPORT_SYMBOL_GPL(pci_hp_create_module_link); 393EXPORT_SYMBOL_GPL(pci_hp_create_module_link);