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:
Aneesh Kumar K.V
2011-05-20 18:55:52 +00:00
committed by Eric Van Hensbergen
parent 398c4f0efb
commit fe1cbabaea
2 changed files with 13 additions and 9 deletions

View File

@ -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);