Commit afcf6792afd66209161495f691e19d4fc5460a93

Authored by Al Viro
1 parent 02f5fde5df

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 <viro@zeniv.linux.org.uk>

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

... ... @@ -1392,7 +1392,7 @@
1392 1392 for (i = 0; i < test_stateid->ts_num_ids; i++) {
1393 1393 stateid = kmalloc(sizeof(struct nfsd4_test_stateid_id), GFP_KERNEL);
1394 1394 if (!stateid) {
1395   - status = PTR_ERR(stateid);
  1395 + status = nfserrno(-ENOMEM);
1396 1396 goto out;
1397 1397 }
1398 1398