aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>2008-09-29 04:37:05 -0400
committerJesse Barnes <jbarnes@virtuousgeek.org>2008-10-20 14:01:50 -0400
commitbd1d9855be3ab8a5c2b31053d464b7fe63e6963b (patch)
treeafcef4f9a3716fa7c30f8aa1c234f7690f845926
parente5665a45fa28d0114f61b5d534a3b2678592219d (diff)
PCI hotplug: fix get_##name return value problem
The commit 356a9d6f3dd283f83861adf1ac909879f0e66411 (PCI: fix hotplug get_##name return value problem) doesn't seem to be merged properly. Because of this, PCI hotplug no longer works (Read/Write PCI hotplug files always returns -ENODEV). This patch fixes wrong check of try_module_get() return value check in get_##name(). Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
-rw-r--r--drivers/pci/hotplug/pci_hotplug_core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/hotplug/pci_hotplug_core.c b/drivers/pci/hotplug/pci_hotplug_core.c
index 27d2b6fe5d53..2e6c4474644e 100644
--- a/drivers/pci/hotplug/pci_hotplug_core.c
+++ b/drivers/pci/hotplug/pci_hotplug_core.c
@@ -102,7 +102,7 @@ static int get_##name (struct hotplug_slot *slot, type *value) \
102{ \ 102{ \
103 struct hotplug_slot_ops *ops = slot->ops; \ 103 struct hotplug_slot_ops *ops = slot->ops; \
104 int retval = 0; \ 104 int retval = 0; \
105 if (try_module_get(ops->owner)) \ 105 if (!try_module_get(ops->owner)) \
106 return -ENODEV; \ 106 return -ENODEV; \
107 if (ops->get_##name) \ 107 if (ops->get_##name) \
108 retval = ops->get_##name(slot, value); \ 108 retval = ops->get_##name(slot, value); \