Commit 8f0d97b41523fb85a2d230f6794121e5834f0cf9

Authored by Dan Carpenter
Committed by Trond Myklebust
1 parent 015f0212d5

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>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

... ... @@ -123,7 +123,7 @@
123 123 size_t desclen = typelen + namelen + 2;
124 124  
125 125 *desc = kmalloc(desclen, GFP_KERNEL);
126   - if (!desc)
  126 + if (!*desc)
127 127 return -ENOMEM;
128 128  
129 129 cp = *desc;