From 0b9dae6aeb0e5397b426e135509046b323740fd5 Mon Sep 17 00:00:00 2001 From: Andrew Vasquez Date: Tue, 4 May 2010 15:01:21 -0700 Subject: [PATCH] [SCSI] qla2xxx: Check for ISP84xx before processing to get 84xx firmware version. Signed-off-by: Giridhar Malavali Signed-off-by: James Bottomley --- drivers/scsi/qla2xxx/qla_attr.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c index c272af4a76e4..d416c3599e38 100644 --- a/drivers/scsi/qla2xxx/qla_attr.c +++ b/drivers/scsi/qla2xxx/qla_attr.c @@ -1198,9 +1198,11 @@ qla24xx_84xx_fw_version_show(struct device *dev, scsi_qla_host_t *vha = shost_priv(class_to_shost(dev)); struct qla_hw_data *ha = vha->hw; - if (IS_QLA84XX(ha) && ha->cs84xx) - if (ha->cs84xx->op_fw_version == 0) - rval = qla84xx_verify_chip(vha, status); + if (!IS_QLA84XX(ha)) + return snprintf(buf, PAGE_SIZE, "\n"); + + if (ha->cs84xx && ha->cs84xx->op_fw_version == 0) + rval = qla84xx_verify_chip(vha, status); if ((rval == QLA_SUCCESS) && (status[0] == 0)) return snprintf(buf, PAGE_SIZE, "%u\n", -- GitLab