Fix zfs-0.8.3 'make lint' warnings

Fix these lint warnings on zfs-0.8.3:

$ make lint
[module/spl/spl-vnode.c:494]: (error) Uninitialized variable: fp
[module/spl/spl-vnode.c:706]: (error) Uninitialized variable: fp
[module/spl/spl-vnode.c:706]: (error) Uninitialized variable: next_fp
^CMakefile:1632: recipe for target 'cppcheck' failed
make: *** [cppcheck] Interrupt

Signed-off-by: Tony Hutter <hutter2@llnl.gov>
This commit is contained in:
Tony Hutter 2020-01-07 18:02:49 -05:00
parent 82be309780
commit 543b0c644a

View File

@ -489,7 +489,7 @@ EXPORT_SYMBOL(vn_space);
static file_t * static file_t *
file_find(int fd, struct task_struct *task) file_find(int fd, struct task_struct *task)
{ {
file_t *fp; file_t *fp = NULL;
list_for_each_entry(fp, &vn_file_list, f_list) { list_for_each_entry(fp, &vn_file_list, f_list) {
if (fd == fp->f_fd && fp->f_task == task) { if (fd == fp->f_fd && fp->f_task == task) {
@ -698,7 +698,7 @@ spl_vn_init(void)
void void
spl_vn_fini(void) spl_vn_fini(void)
{ {
file_t *fp, *next_fp; file_t *fp = NULL, *next_fp = NULL;
int leaked = 0; int leaked = 0;
spin_lock(&vn_file_lock); spin_lock(&vn_file_lock);