diff options
-rw-r--r-- | drivers/pci/hotplug/rpaphp_slot.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/pci/hotplug/rpaphp_slot.c b/drivers/pci/hotplug/rpaphp_slot.c index dd1e275a82ce..865b0b7ef20c 100644 --- a/drivers/pci/hotplug/rpaphp_slot.c +++ b/drivers/pci/hotplug/rpaphp_slot.c | |||
@@ -56,7 +56,6 @@ static struct hotplug_slot_attribute php_attr_location = { | |||
56 | static void rpaphp_release_slot(struct hotplug_slot *hotplug_slot) | 56 | static void rpaphp_release_slot(struct hotplug_slot *hotplug_slot) |
57 | { | 57 | { |
58 | struct slot *slot = (struct slot *) hotplug_slot->private; | 58 | struct slot *slot = (struct slot *) hotplug_slot->private; |
59 | |||
60 | dealloc_slot_struct(slot); | 59 | dealloc_slot_struct(slot); |
61 | } | 60 | } |
62 | 61 | ||
@@ -65,12 +64,12 @@ void dealloc_slot_struct(struct slot *slot) | |||
65 | kfree(slot->hotplug_slot->info); | 64 | kfree(slot->hotplug_slot->info); |
66 | kfree(slot->hotplug_slot->name); | 65 | kfree(slot->hotplug_slot->name); |
67 | kfree(slot->hotplug_slot); | 66 | kfree(slot->hotplug_slot); |
67 | kfree(slot->location); | ||
68 | kfree(slot); | 68 | kfree(slot); |
69 | return; | ||
70 | } | 69 | } |
71 | 70 | ||
72 | struct slot *alloc_slot_struct(struct device_node *dn, int drc_index, char *drc_name, | 71 | struct slot *alloc_slot_struct(struct device_node *dn, |
73 | int power_domain) | 72 | int drc_index, char *drc_name, int power_domain) |
74 | { | 73 | { |
75 | struct slot *slot; | 74 | struct slot *slot; |
76 | 75 | ||
@@ -115,7 +114,7 @@ error_nomem: | |||
115 | 114 | ||
116 | static int is_registered(struct slot *slot) | 115 | static int is_registered(struct slot *slot) |
117 | { | 116 | { |
118 | struct slot *tmp_slot; | 117 | struct slot *tmp_slot; |
119 | 118 | ||
120 | list_for_each_entry(tmp_slot, &rpaphp_slot_head, rpaphp_slot_list) { | 119 | list_for_each_entry(tmp_slot, &rpaphp_slot_head, rpaphp_slot_list) { |
121 | if (!strcmp(tmp_slot->name, slot->name)) | 120 | if (!strcmp(tmp_slot->name, slot->name)) |