diff options
| author | Bart Van Assche <bvanassche@acm.org> | 2019-08-08 23:02:00 -0400 |
|---|---|---|
| committer | Martin K. Petersen <martin.petersen@oracle.com> | 2019-08-12 21:34:08 -0400 |
| commit | 0597fe601a3a7d103c35b922046251906e0349b3 (patch) | |
| tree | c9ee9435f6d6a8eecf5c815252e7a62d61962bdf /drivers/scsi/qla2xxx | |
| parent | c43e7832ee77daadf147876b93f23035b89fa028 (diff) | |
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>
Diffstat (limited to 'drivers/scsi/qla2xxx')
| -rw-r--r-- | drivers/scsi/qla2xxx/qla_init.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index 5258d2486e25..a6a66b5d36a3 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c | |||
| @@ -7562,8 +7562,12 @@ qla27xx_get_active_image(struct scsi_qla_host *vha, | |||
| 7562 | goto check_sec_image; | 7562 | goto check_sec_image; |
| 7563 | } | 7563 | } |
| 7564 | 7564 | ||
| 7565 | qla24xx_read_flash_data(vha, (void *)(&pri_image_status), | 7565 | if (qla24xx_read_flash_data(vha, (void *)(&pri_image_status), |
| 7566 | ha->flt_region_img_status_pri, sizeof(pri_image_status) >> 2); | 7566 | ha->flt_region_img_status_pri, sizeof(pri_image_status) >> 2) != |
| 7567 | QLA_SUCCESS) { | ||
| 7568 | WARN_ON_ONCE(true); | ||
| 7569 | goto check_sec_image; | ||
| 7570 | } | ||
| 7567 | qla27xx_print_image(vha, "Primary image", &pri_image_status); | 7571 | qla27xx_print_image(vha, "Primary image", &pri_image_status); |
| 7568 | 7572 | ||
| 7569 | if (qla27xx_check_image_status_signature(&pri_image_status)) { | 7573 | if (qla27xx_check_image_status_signature(&pri_image_status)) { |
