Skip to content

Commit ad7b295

Browse files
fix: thermal_zone, handle EINVAL errors from sysfs reads.
1 parent 9b0219b commit ad7b295

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sysfs/class_thermal.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ func (fs FS) ClassThermalZoneStats() ([]ClassThermalZoneStats, error) {
5151
for _, zone := range zones {
5252
zoneStats, err := parseClassThermalZone(zone)
5353
if err != nil {
54-
if errors.Is(err, syscall.ENODATA) || errors.As(err, new(*fsp.PathError)) || errors.Is(err, syscall.EAGAIN) {
54+
if errors.Is(err, syscall.ENODATA) || errors.As(err, new(*fsp.PathError)) || errors.Is(err, syscall.EAGAIN) ||
55+
errors.Is(err, syscall.EINVAL) {
5556
continue
5657
}
5758
return nil, err

0 commit comments

Comments
 (0)