diff options
| -rw-r--r-- | drivers/misc/thinkpad_acpi.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/misc/thinkpad_acpi.c b/drivers/misc/thinkpad_acpi.c index b85f0960e608..7aed118ca82b 100644 --- a/drivers/misc/thinkpad_acpi.c +++ b/drivers/misc/thinkpad_acpi.c | |||
| @@ -2824,7 +2824,9 @@ static ssize_t fan_pwm1_enable_store(struct device *dev, | |||
| 2824 | } | 2824 | } |
| 2825 | 2825 | ||
| 2826 | res = fan_set_level_safe(level); | 2826 | res = fan_set_level_safe(level); |
| 2827 | if (res < 0) | 2827 | if (res == -ENXIO) |
| 2828 | return -EINVAL; | ||
| 2829 | else if (res < 0) | ||
| 2828 | return res; | 2830 | return res; |
| 2829 | 2831 | ||
| 2830 | fan_watchdog_reset(); | 2832 | fan_watchdog_reset(); |
| @@ -2888,7 +2890,9 @@ static ssize_t fan_pwm1_store(struct device *dev, | |||
| 2888 | if (!rc && (status & | 2890 | if (!rc && (status & |
| 2889 | (TP_EC_FAN_AUTO | TP_EC_FAN_FULLSPEED)) == 0) { | 2891 | (TP_EC_FAN_AUTO | TP_EC_FAN_FULLSPEED)) == 0) { |
| 2890 | rc = fan_set_level(newlevel); | 2892 | rc = fan_set_level(newlevel); |
| 2891 | if (!rc) { | 2893 | if (rc == -ENXIO) |
| 2894 | rc = -EINVAL; | ||
| 2895 | else if (!rc) { | ||
| 2892 | fan_update_desired_level(newlevel); | 2896 | fan_update_desired_level(newlevel); |
| 2893 | fan_watchdog_reset(); | 2897 | fan_watchdog_reset(); |
| 2894 | } | 2898 | } |
