summaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2010-10-28 08:05:57 +0200
committerTrond Myklebust <Trond.Myklebust@netapp.com>2010-10-28 17:18:00 +0200
commit8f0d97b41523fb85a2d230f6794121e5834f0cf9 (patch)
tree8ed8b6320e8c8fa288f94f1b31f3a6e7ed0385bb /fs/nfs
parentnfs: handle lock context allocation failures in nfs_create_request (diff)
downloadlinux-8f0d97b41523fb85a2d230f6794121e5834f0cf9.tar.xz
linux-8f0d97b41523fb85a2d230f6794121e5834f0cf9.zip
nfs: testing the wrong variable
The intent was to test "*desc" for allocation failures, but it tests "desc" which is always a valid pointer here. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/idmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/idmap.c b/fs/nfs/idmap.c
index dec47ed8b6b9..4e2d9b6b1380 100644
--- a/fs/nfs/idmap.c
+++ b/fs/nfs/idmap.c
@@ -123,7 +123,7 @@ static ssize_t nfs_idmap_get_desc(const char *name, size_t namelen,
size_t desclen = typelen + namelen + 2;
*desc = kmalloc(desclen, GFP_KERNEL);
- if (!desc)
+ if (!*desc)
return -ENOMEM;
cp = *desc;