Commit 8dcc66a
committed
hwmon: (sht3x) Fix error handling
Handling of errors when reading status, temperature, and humidity returns
the error number as negative attribute value. Fix it up by returning
the error as return value.
Fixes: a0ac418 ("hwmon: (sht3x) convert some of sysfs interface to hwmon")
Cc: JuenKit Yip <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>1 parent a09a5aa commit 8dcc66a
1 file changed
Lines changed: 17 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
291 | 291 | | |
292 | 292 | | |
293 | 293 | | |
294 | | - | |
| 294 | + | |
295 | 295 | | |
296 | 296 | | |
297 | 297 | | |
298 | 298 | | |
299 | 299 | | |
300 | 300 | | |
301 | | - | |
| 301 | + | |
| 302 | + | |
302 | 303 | | |
303 | 304 | | |
304 | | - | |
| 305 | + | |
305 | 306 | | |
306 | 307 | | |
307 | 308 | | |
308 | 309 | | |
309 | 310 | | |
310 | 311 | | |
311 | | - | |
| 312 | + | |
| 313 | + | |
312 | 314 | | |
313 | 315 | | |
314 | 316 | | |
| |||
706 | 708 | | |
707 | 709 | | |
708 | 710 | | |
| 711 | + | |
709 | 712 | | |
710 | 713 | | |
711 | 714 | | |
| |||
720 | 723 | | |
721 | 724 | | |
722 | 725 | | |
723 | | - | |
724 | | - | |
| 726 | + | |
725 | 727 | | |
726 | | - | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
727 | 732 | | |
728 | 733 | | |
729 | 734 | | |
| |||
748 | 753 | | |
749 | 754 | | |
750 | 755 | | |
751 | | - | |
752 | | - | |
| 756 | + | |
753 | 757 | | |
754 | | - | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
755 | 762 | | |
756 | 763 | | |
757 | 764 | | |
| |||
0 commit comments