summaryrefslogtreecommitdiffstats
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 11:18:00 -0400
commit8f0d97b41523fb85a2d230f6794121e5834f0cf9 (patch)
tree8ed8b6320e8c8fa288f94f1b31f3a6e7ed0385bb
parent015f0212d51d85bd281a831639a769b4a1a3307a (diff)
downloadop-kernel-dev-8f0d97b41523fb85a2d230f6794121e5834f0cf9.zip
op-kernel-dev-8f0d97b41523fb85a2d230f6794121e5834f0cf9.tar.gz
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>
-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 dec47ed..4e2d9b6 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;
OpenPOWER on IntegriCloud