aboutsummaryrefslogtreecommitdiff
path: root/drivers/scsi/qla2xxx
diff options
context:
space:
mode:
authorJoe Carnuccio <joe.carnuccio@qlogic.com>2012-02-09 11:15:40 -0800
committerJames Bottomley <JBottomley@Parallels.com>2012-02-19 08:17:17 -0600
commitaa61556fa3cf7d0e39a67dc5b043b96519ce3726 (patch)
tree7fd4d065f1cac7fa1993dfc8e709c2def367fbae /drivers/scsi/qla2xxx
parentb3b02e6e9512636d5a1839b325e4722e80cda90d (diff)
[SCSI] qla2xxx: Return blank sysfs string on initial get thermal failure.
When thermal temperature initially fails, return a blank string to the sysfs interface. This fixes the initial display of 0.00 followed by subsequent display of blank line; the initial 0.00 should have not displayed for cards that do not support thermal temperature. Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com> Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/qla2xxx')
-rw-r--r--drivers/scsi/qla2xxx/qla_attr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c
index 0635be522cd..5433f95f3ed 100644
--- a/drivers/scsi/qla2xxx/qla_attr.c
+++ b/drivers/scsi/qla2xxx/qla_attr.c
@@ -1365,7 +1365,7 @@ qla2x00_thermal_temp_show(struct device *dev,
else if (!vha->hw->flags.eeh_busy)
rval = qla2x00_get_thermal_temp(vha, &temp, &frac);
if (rval != QLA_SUCCESS)
- temp = frac = 0;
+ return snprintf(buf, PAGE_SIZE, "\n");
return snprintf(buf, PAGE_SIZE, "%d.%02d\n", temp, frac);
}