net/9p: p9_idpool_get return -1 on error
We need to return -1 on error. Also handle error properly Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
This commit is contained in:
parent
398c4f0efb
commit
fe1cbabaea
2 changed files with 13 additions and 9 deletions
|
|
@ -93,7 +93,7 @@ int p9_idpool_get(struct p9_idpool *p)
|
|||
|
||||
retry:
|
||||
if (idr_pre_get(&p->pool, GFP_NOFS) == 0)
|
||||
return 0;
|
||||
return -1;
|
||||
|
||||
spin_lock_irqsave(&p->lock, flags);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue