From: Dan Carpenter Date: Mon, 4 Apr 2022 20:06:28 +0000 (-0400) Subject: dlm: uninitialized variable on error in dlm_listen_for_all() X-Git-Tag: v6.6.17~7471^2~27 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1f4f10845e14690b02410de50d9ea9684625a4ae;p=platform%2Fkernel%2Flinux-rpi.git dlm: uninitialized variable on error in dlm_listen_for_all() The "sock" variable is not initialized on this error path. Cc: stable@vger.kernel.org Fixes: 2dc6b1158c28 ("fs: dlm: introduce generic listen") Signed-off-by: Dan Carpenter Signed-off-by: Alexander Aring Signed-off-by: David Teigland --- diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c index e284d69..6ed935a 100644 --- a/fs/dlm/lowcomms.c +++ b/fs/dlm/lowcomms.c @@ -1789,7 +1789,7 @@ static int dlm_listen_for_all(void) SOCK_STREAM, dlm_proto_ops->proto, &sock); if (result < 0) { log_print("Can't create comms socket: %d", result); - goto out; + return result; } sock_set_mark(sock->sk, dlm_config.ci_mark);