Commit 63c454f8 authored by Namjae Jeon's avatar Namjae Jeon
Browse files

cifsd: fix WARNING: Possible unnecessary 'out of memory' message



WARNING: Possible unnecessary 'out of memory' message
902: FILE: fs/cifsd/smb2pdu.c:569:
+       if (!work->response_buf) {
+               ksmbd_err("Failed to allocate %zu bytes buffer\n", sz);

Fix a warning from checkpatch.pl.

Signed-off-by: default avatarNamjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
parent fad4161b
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -565,10 +565,8 @@ int smb2_allocate_rsp_buf(struct ksmbd_work *work)
	else
		work->response_buf = kvmalloc(sz, GFP_KERNEL | __GFP_ZERO);

	if (!work->response_buf) {
		ksmbd_err("Failed to allocate %zu bytes buffer\n", sz);
	if (!work->response_buf)
		return -ENOMEM;
	}

	work->response_sz = sz;
	return 0;