Although the callers of this function only care about whether the return value is null or not, we should still give a rigorous error code. Smatch tool warning: net/sunrpc/auth_gss/svcauth_gss.c:784 gss_write_verf() warn: returning -1 instead of -ENOMEM is sloppy No functional change, just more standardized.
Unified · Split
| @@ -781,7 +781,7 @@ gss_write_verf(struct svc_rqst *rqstp, struct gss_ctx *ctx_id, u32 seq) · 780 unmodified lines | |||
| 781 | svc_putnl(rqstp->rq_res.head, RPC_AUTH_GSS); | 781 | svc_putnl(rqstp->rq_res.head, RPC_AUTH_GSS); |
| 782 | xdr_seq = kmalloc(4, GFP_KERNEL); | 782 | xdr_seq = kmalloc(4, GFP_KERNEL); |
| 783 | if (!xdr_seq) | 783 | if (!xdr_seq) |
| 784 | return -1; | 784 | return -ENOMEM; |
| 785 | *xdr_seq = htonl(seq); | 785 | *xdr_seq = htonl(seq); |
| 786 | 786 | ||
| 787 | iov.iov_base = xdr_seq; | 787 | iov.iov_base = xdr_seq; |