From afa8f016c5a527bd004042ea47ca8b8007e4185f Mon Sep 17 00:00:00 2001 From: Namjae Jeon Date: Fri, 18 Jun 2021 10:18:34 +0900 Subject: [PATCH] ksmbd: initialize variables on the declaration Initialize variables on the declaration. Reviewed-by: Christoph Hellwig Signed-off-by: Namjae Jeon Signed-off-by: Steve French --- fs/cifsd/vfs.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/fs/cifsd/vfs.c b/fs/cifsd/vfs.c index fb31c1c..4e0cf1b 100644 --- a/fs/cifsd/vfs.c +++ b/fs/cifsd/vfs.c @@ -355,14 +355,11 @@ out: int ksmbd_vfs_read(struct ksmbd_work *work, struct ksmbd_file *fp, size_t count, loff_t *pos) { - struct file *filp; + struct file *filp = fp->filp; ssize_t nbytes = 0; - char *rbuf; - struct inode *inode; + char *rbuf = work->aux_payload_buf; + struct inode *inode = file_inode(filp); - rbuf = work->aux_payload_buf; - filp = fp->filp; - inode = file_inode(filp); if (S_ISDIR(inode->i_mode)) return -EISDIR; -- 2.7.4