Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 97407
b: refs/heads/master
c: a86161b
h: refs/heads/master
i:
  97405: e732bb6
  97403: a3fb4a1
  97399: 0ae94b8
  97391: 8ce6072
  97375: 028b29e
  97343: a04a227
  97279: 0775dc6
v: v3
  • Loading branch information
Kenji Kaneshige authored and Jesse Barnes committed May 27, 2008
1 parent 181d449 commit 9b62f7c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0711c70ec0e9d2c002b1e9b5fb9f21e49d77f4fd
refs/heads/master: a86161b3134465f072d965ca7508ec9c1e2e52c7
7 changes: 6 additions & 1 deletion trunk/drivers/pci/hotplug/pci_hotplug_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -619,6 +619,7 @@ static struct hotplug_slot *get_slot_from_name (const char *name)
int pci_hp_register (struct hotplug_slot *slot)
{
int result;
struct hotplug_slot *tmp;

if (slot == NULL)
return -ENODEV;
Expand All @@ -630,7 +631,11 @@ int pci_hp_register (struct hotplug_slot *slot)
return -EINVAL;
}

/* this can fail if we have already registered a slot with the same name */
/* Check if we have already registered a slot with the same name. */
tmp = get_slot_from_name(slot->name);
if (tmp)
return -EEXIST;

slot->kobj.kset = pci_hotplug_slots_kset;
result = kobject_init_and_add(&slot->kobj, &hotplug_slot_ktype, NULL,
"%s", slot->name);
Expand Down

0 comments on commit 9b62f7c

Please sign in to comment.