ChangeSet 1.1587.12.65, 2004/04/30 15:03:27-07:00, eike-hotplug@sf-tec.de

[PATCH] RPA PCI Hotplug: remove useless NULL checks from rpaphp_core.c

Remove two useless NULL checks from rpaphp_core.c


 drivers/pci/hotplug/rpaphp_core.c |   10 ++--------
 1 files changed, 2 insertions(+), 8 deletions(-)


diff -Nru a/drivers/pci/hotplug/rpaphp_core.c b/drivers/pci/hotplug/rpaphp_core.c
--- a/drivers/pci/hotplug/rpaphp_core.c	Mon May 17 16:59:15 2004
+++ b/drivers/pci/hotplug/rpaphp_core.c	Mon May 17 16:59:15 2004
@@ -354,10 +354,7 @@
 static int enable_slot(struct hotplug_slot *hotplug_slot)
 {
 	int retval = 0;
-	struct slot *slot = get_slot(hotplug_slot, __FUNCTION__);
-
-	if (slot == NULL)
-		return -ENODEV;
+	struct slot *slot = (struct slot *)hotplug_slot->private;
 
 	if (slot->state == CONFIGURED) {
 		dbg("%s: %s is already enabled\n", __FUNCTION__, slot->name);
@@ -385,10 +382,7 @@
 static int disable_slot(struct hotplug_slot *hotplug_slot)
 {
 	int retval;
-	struct slot *slot = get_slot(hotplug_slot, __FUNCTION__);
-
-	if (slot == NULL)
-		return -ENODEV;
+	struct slot *slot = (struct slot *)hotplug_slot->private;
 
 	dbg("%s - Entry: slot[%s]\n", __FUNCTION__, slot->name);
 
