Commit 8f0d97b4 authored by Dan Carpenter's avatar Dan Carpenter Committed by Trond Myklebust
Browse files

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: default avatarDan Carpenter <error27@gmail.com>
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent 015f0212
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -123,7 +123,7 @@ static ssize_t nfs_idmap_get_desc(const char *name, size_t namelen,
	size_t desclen = typelen + namelen + 2;
	size_t desclen = typelen + namelen + 2;


	*desc = kmalloc(desclen, GFP_KERNEL);
	*desc = kmalloc(desclen, GFP_KERNEL);
	if (!desc)
	if (!*desc)
		return -ENOMEM;
		return -ENOMEM;


	cp = *desc;
	cp = *desc;