• Arnd Bergmann's avatar
    scsi: advansys: fix build warning for PCI=n · f46e7cd3
    Arnd Bergmann authored
    The advansys probe function tries to handle both ISA and PCI cases, each
    hidden in an #ifdef when unused. This leads to a warning indicating that
    when PCI is disabled we could be using uninitialized data:
    
    drivers/scsi/advansys.c: In function  advansys_board_found :
    drivers/scsi/advansys.c:11036:5: error:  ret  may be used uninitialized in this function [-Werror=maybe-uninitialized]
    drivers/scsi/advansys.c:10928:28: note:  ret  was declared here
    drivers/scsi/advansys.c:11309:8: error:  share_irq  may be used uninitialized in this function [-Werror=maybe-uninitialized]
    drivers/scsi/advansys.c:10928:6: note:  share_irq  was declared here
    
    This cannot happen in practice because the hardware in question only
    exists for PCI, but changing the code to just error out here is better
    for consistency and avoids the warning.
    Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    Reviewed-by: default avatarHannes Reinecke <hare@suse.com>
    Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
    f46e7cd3
advansys.c 346 KB