Skip to content

Commit

Permalink
nfsd: fix error value on allocation failure in nfsd4_decode_test_stat…
Browse files Browse the repository at this point in the history
…eid()

PTR_ERR(NULL) is going to be 0...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Al Viro committed Apr 13, 2012
1 parent 02f5fde commit afcf679
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/nfsd/nfs4xdr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit afcf679

Please sign in to comment.