mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-22 12:14:01 +08:00
[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>
This commit is contained in:
parent
b3b02e6e95
commit
aa61556fa3
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user