diff options
author | Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> | 2011-05-20 14:55:52 -0400 |
---|---|---|
committer | Eric Van Hensbergen <ericvh@gmail.com> | 2011-05-25 09:46:38 -0400 |
commit | fe1cbabaea5e99a93bafe12fbf1b3b9cc71b610a (patch) | |
tree | 370e20e37796404602072f08b430ce04c6eb8188 /net/9p/util.c | |
parent | 398c4f0efb5c2f07fe2f5cd67031b15fd3e920c9 (diff) |
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>
Diffstat (limited to 'net/9p/util.c')
-rw-r--r-- | net/9p/util.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/9p/util.c b/net/9p/util.c index da6af81e59d9..9c1c9348ac35 100644 --- a/net/9p/util.c +++ b/net/9p/util.c | |||
@@ -93,7 +93,7 @@ int p9_idpool_get(struct p9_idpool *p) | |||
93 | 93 | ||
94 | retry: | 94 | retry: |
95 | if (idr_pre_get(&p->pool, GFP_NOFS) == 0) | 95 | if (idr_pre_get(&p->pool, GFP_NOFS) == 0) |
96 | return 0; | 96 | return -1; |
97 | 97 | ||
98 | spin_lock_irqsave(&p->lock, flags); | 98 | spin_lock_irqsave(&p->lock, flags); |
99 | 99 | ||