From: Al Viro Date: Fri, 13 Apr 2012 04:15:37 +0000 (-0400) Subject: nfsd: fix error value on allocation failure in nfsd4_decode_test_stateid() X-Git-Tag: v3.4-rc4~35^2~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=afcf6792afd66209161495f691e19d4fc5460a93;p=platform%2Fkernel%2Flinux-3.10.git nfsd: fix error value on allocation failure in nfsd4_decode_test_stateid() PTR_ERR(NULL) is going to be 0... Signed-off-by: Al Viro --- diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c index 07a99b6..74c00bc 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c @@ -1392,7 +1392,7 @@ nfsd4_decode_test_stateid(struct nfsd4_compoundargs *argp, struct nfsd4_test_sta for (i = 0; i < test_stateid->ts_num_ids; i++) { stateid = kmalloc(sizeof(struct nfsd4_test_stateid_id), GFP_KERNEL); if (!stateid) { - status = PTR_ERR(stateid); + status = nfserrno(-ENOMEM); goto out; }