aic94xx: maybe uninitialized variable in asd_process_ctrl_a_user

From: Filipe Brandenburger
Date: Fri Apr 11 2014 - 01:13:22 EST


Hi James,

While building a recent kernel with -Werror I found this warning:

drivers/scsi/aic94xx/aic94xx_sds.c: In function 'asd_read_flash':
drivers/scsi/aic94xx/aic94xx_sds.c:597:21: error: 'offs' may be used
uninitialized in this function [-Werror=maybe-uninitialized]
drivers/scsi/aic94xx/aic94xx_sds.c:985:6: note: 'offs' was declared here

This looks like a valid complaint from the compiler, since in
asd_process_ctrl_a_user if the call to asd_find_flash_de fails (and
returns -ENOENT) then offs will not be set, but that will not prevent
the variable to be later passed to the call to asd_read_flash_seg
later in that same function.

Would you please have a look at it? Let me know if there's a more
appropriate way to report these issues (e.g. bug tracker.)

Thanks,
Filipe
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/