scsi: qla2xxx: Check secondary image if reading the primary image fails
This patch fixes several Coverity complaints about reading data that has not been initialized. Cc: Himanshu Madhani <hmadhani@marvell.com> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Tested-by: Himanshu Madhani <hmadhani@marvell.com> Reviewed-by: Himanshu Madhani <hmadhani@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
c43e7832ee
commit
0597fe601a
|
@ -7562,8 +7562,12 @@ qla27xx_get_active_image(struct scsi_qla_host *vha,
|
||||||
goto check_sec_image;
|
goto check_sec_image;
|
||||||
}
|
}
|
||||||
|
|
||||||
qla24xx_read_flash_data(vha, (void *)(&pri_image_status),
|
if (qla24xx_read_flash_data(vha, (void *)(&pri_image_status),
|
||||||
ha->flt_region_img_status_pri, sizeof(pri_image_status) >> 2);
|
ha->flt_region_img_status_pri, sizeof(pri_image_status) >> 2) !=
|
||||||
|
QLA_SUCCESS) {
|
||||||
|
WARN_ON_ONCE(true);
|
||||||
|
goto check_sec_image;
|
||||||
|
}
|
||||||
qla27xx_print_image(vha, "Primary image", &pri_image_status);
|
qla27xx_print_image(vha, "Primary image", &pri_image_status);
|
||||||
|
|
||||||
if (qla27xx_check_image_status_signature(&pri_image_status)) {
|
if (qla27xx_check_image_status_signature(&pri_image_status)) {
|
||||||
|
|
Loading…
Reference in a new issue