Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 359366
b: refs/heads/master
c: ab51603
h: refs/heads/master
v: v3
  • Loading branch information
Tejun Heo authored and Linus Torvalds committed Feb 28, 2013
1 parent a5fa81a commit b6891d0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 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: c9365bd028a48017ebc09d7a565d3b6bbc86b3c6
refs/heads/master: ab51603672a335d325963ca410d9c527d9f834f7
12 changes: 4 additions & 8 deletions trunk/drivers/scsi/lpfc/lpfc_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -3165,14 +3165,10 @@ destroy_port(struct lpfc_vport *vport)
int
lpfc_get_instance(void)
{
int instance = 0;

/* Assign an unused number */
if (!idr_pre_get(&lpfc_hba_index, GFP_KERNEL))
return -1;
if (idr_get_new(&lpfc_hba_index, NULL, &instance))
return -1;
return instance;
int ret;

ret = idr_alloc(&lpfc_hba_index, NULL, 0, 0, GFP_KERNEL);
return ret < 0 ? -1 : ret;
}

/**
Expand Down

0 comments on commit b6891d0

Please sign in to comment.