Skip to content

Commit

Permalink
[SCSI] qla2xxx: Return blank sysfs string on initial get thermal fail…
Browse files Browse the repository at this point in the history
…ure.

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>
  • Loading branch information
Joe Carnuccio authored and James Bottomley committed Feb 19, 2012
1 parent b3b02e6 commit aa61556
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/scsi/qla2xxx/qla_attr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit aa61556

Please sign in to comment.