Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 359352
b: refs/heads/master
c: 9f12563
h: refs/heads/master
v: v3
  • Loading branch information
Tejun Heo authored and Linus Torvalds committed Feb 28, 2013
1 parent 7f6d45c commit abe4ff6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 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: 7b51f47835f61d9ee6273908b774a0f569e99646
refs/heads/master: 9f12563db1e079aaf9821104e6dfff4873b3f4b6
13 changes: 6 additions & 7 deletions trunk/drivers/mfd/rtsx_pcr.c
Original file line number Diff line number Diff line change
Expand Up @@ -1091,15 +1091,14 @@ static int rtsx_pci_probe(struct pci_dev *pcidev,
}
handle->pcr = pcr;

if (!idr_pre_get(&rtsx_pci_idr, GFP_KERNEL)) {
ret = -ENOMEM;
goto free_handle;
}

idr_preload(GFP_KERNEL);
spin_lock(&rtsx_pci_lock);
ret = idr_get_new(&rtsx_pci_idr, pcr, &pcr->id);
ret = idr_alloc(&rtsx_pci_idr, pcr, 0, 0, GFP_NOWAIT);
if (ret >= 0)
pcr->id = ret;
spin_unlock(&rtsx_pci_lock);
if (ret)
idr_preload_end();
if (ret < 0)
goto free_handle;

pcr->pci = pcidev;
Expand Down

0 comments on commit abe4ff6

Please sign in to comment.