diff options
author | Dan Carpenter <error27@gmail.com> | 2010-10-28 10:05:57 +0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2010-10-28 19:18:00 +0400 |
commit | 8f0d97b41523fb85a2d230f6794121e5834f0cf9 (patch) | |
tree | 8ed8b6320e8c8fa288f94f1b31f3a6e7ed0385bb /fs/nfs/idmap.c | |
parent | 015f0212d51d85bd281a831639a769b4a1a3307a (diff) | |
download | linux-8f0d97b41523fb85a2d230f6794121e5834f0cf9.tar.xz |
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/idmap.c')
-rw-r--r-- | fs/nfs/idmap.c | 2 |
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; |