summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx
diff options
context:
space:
mode:
authorJoe Carnuccio <joe.carnuccio@qlogic.com>2012-02-09 20:15:40 +0100
committerJames Bottomley <JBottomley@Parallels.com>2012-02-19 15:17:17 +0100
commitaa61556fa3cf7d0e39a67dc5b043b96519ce3726 (patch)
tree7fd4d065f1cac7fa1993dfc8e709c2def367fbae /drivers/scsi/qla2xxx
parent[SCSI] qla2xxx: Handle change notifications based on switch scan results. (diff)
downloadlinux-aa61556fa3cf7d0e39a67dc5b043b96519ce3726.tar.xz
linux-aa61556fa3cf7d0e39a67dc5b043b96519ce3726.zip
[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 0635be522cd2..5433f95f3edd 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);
}