We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bbc873c commit a61d832Copy full SHA for a61d832
1 file changed
tp_smapi.c
@@ -779,7 +779,7 @@ static ssize_t store_battery_start_charge_thresh(struct device *dev,
779
780
down(&smapi_mutex);
781
ret = get_thresh(bat, THRESH_STOP, &other_thresh);
782
- if (ret != -EOPNOTSUPP) {
+ if (ret != -EOPNOTSUPP && ret != -ENXIO) {
783
if (ret) /* other threshold is set? */
784
goto out;
785
ret = get_real_thresh(bat, THRESH_START, NULL);
@@ -821,7 +821,7 @@ static ssize_t store_battery_stop_charge_thresh(struct device *dev,
821
822
823
ret = get_thresh(bat, THRESH_START, &other_thresh);
824
- if (ret != -EOPNOTSUPP) { /* other threshold exists? */
+ if (ret != -EOPNOTSUPP && ret != -ENXIO) { /* other threshold exists? */
825
if (ret)
826
827
/* this threshold exists? */
0 commit comments