[PATCH] coverity: fs/udf/namei.c null check

"dir" was dereferenced before null check

Signed-off-by: Zaur Kambarov <zkambarov@coverity.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by KAMBAROV, ZAUR and committed by Linus Torvalds ec471dc4 9c101fd4

+3 -1
+3 -1
fs/udf/namei.c
··· 159 char *nameptr; 160 uint8_t lfi; 161 uint16_t liu; 162 - loff_t size = (udf_ext0_offset(dir) + dir->i_size) >> 2; 163 kernel_lb_addr bloc, eloc; 164 uint32_t extoffset, elen, offset; 165 struct buffer_head *bh = NULL; 166 167 if (!dir) 168 return NULL; 169 170 f_pos = (udf_ext0_offset(dir) >> 2); 171
··· 159 char *nameptr; 160 uint8_t lfi; 161 uint16_t liu; 162 + loff_t size; 163 kernel_lb_addr bloc, eloc; 164 uint32_t extoffset, elen, offset; 165 struct buffer_head *bh = NULL; 166 167 if (!dir) 168 return NULL; 169 + 170 + size = (udf_ext0_offset(dir) + dir->i_size) >> 2; 171 172 f_pos = (udf_ext0_offset(dir) >> 2); 173