Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit aa61556f authored by Joe Carnuccio's avatar Joe Carnuccio Committed by James Bottomley
Browse files

[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: default avatarJoe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: default avatarChad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
parent b3b02e6e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
}