From: Namjae Jeon Date: Tue, 25 Nov 2014 07:52:48 +0000 (+0900) Subject: cifs: remove unneeded condition check X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=15d987063348c93adb3e7c7378226abea03608e2;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git cifs: remove unneeded condition check file->private_data can never be null after calling initiate_cifs_search. So private null check condition is not needed. Signed-off-by: Namjae Jeon Signed-off-by: Ashish Sangwan Signed-off-by: Steve French --- diff --git a/fs/cifs/readdir.c b/fs/cifs/readdir.c index 8fd2a95860ba..803030c9ab68 100644 --- a/fs/cifs/readdir.c +++ b/fs/cifs/readdir.c @@ -794,10 +794,6 @@ int cifs_readdir(struct file *file, struct dir_context *ctx) if it before then restart search if after then keep searching till find it */ - if (file->private_data == NULL) { - rc = -EINVAL; - goto rddir2_exit; - } cifsFile = file->private_data; if (cifsFile->srch_inf.endOfSearch) { if (cifsFile->srch_inf.emptyDir) {