From: Joe Carnuccio Date: Thu, 9 Feb 2012 19:15:40 +0000 (-0800) Subject: [SCSI] qla2xxx: Return blank sysfs string on initial get thermal failure. X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=aa61556fa3cf7d0e39a67dc5b043b96519ce3726;p=mv-sheeva.git [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 Signed-off-by: Chad Dupuis Signed-off-by: James Bottomley --- 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); }