linux-cifs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ksmbd: potential uninitialized error code in set_file_basic_info()
@ 2021-09-07  7:33 Dan Carpenter
  2021-09-07  8:01 ` Sergey Senozhatsky
  0 siblings, 1 reply; 7+ messages in thread
From: Dan Carpenter @ 2021-09-07  7:33 UTC (permalink / raw)
  To: Namjae Jeon, Christian Brauner
  Cc: Sergey Senozhatsky, Steve French, Hyunchul Lee, linux-cifs,
	kernel-janitors

Smatch complains that there are some paths where "rc" is not set.

Fixes: eb5784f0c6ef ("ksmbd: ensure error is surfaced in set_file_basic_info()")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 fs/ksmbd/smb2pdu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ksmbd/smb2pdu.c b/fs/ksmbd/smb2pdu.c
index a350e1cef7f4..c86164dc70bb 100644
--- a/fs/ksmbd/smb2pdu.c
+++ b/fs/ksmbd/smb2pdu.c
@@ -5444,7 +5444,7 @@ static int set_file_basic_info(struct ksmbd_file *fp, char *buf,
 	struct file *filp;
 	struct inode *inode;
 	struct user_namespace *user_ns;
-	int rc;
+	int rc = 0;
 
 	if (!(fp->daccess & FILE_WRITE_ATTRIBUTES_LE))
 		return -EACCES;
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-09-13  9:47 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-07  7:33 [PATCH] ksmbd: potential uninitialized error code in set_file_basic_info() Dan Carpenter
2021-09-07  8:01 ` Sergey Senozhatsky
2021-09-07  8:09   ` Namjae Jeon
2021-09-07  8:38     ` Sergey Senozhatsky
2021-09-13  9:47     ` Christian Brauner
2021-09-07  8:48   ` Dan Carpenter
2021-09-07  9:04     ` Sergey Senozhatsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).