Commit 42d83392 authored by Rolf Eike Beer's avatar Rolf Eike Beer Committed by Deepak Saxena

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

Remove two useless NULL checks from rpaphp_core.c
parent 093d33e3
......@@ -354,10 +354,7 @@ static void __exit rpaphp_exit(void)
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 enable_slot(struct hotplug_slot *hotplug_slot)
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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment