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:
committed by
Eric Van Hensbergen
parent
398c4f0efb
commit
fe1cbabaea
@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user