提交 8f0d97b4 编写于 作者: D Dan Carpenter 提交者: Trond Myklebust

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: NDan Carpenter <error27@gmail.com>
Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
上级 015f0212
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册