aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBetty Dall <betty.dall@hpe.com>2016-04-30 12:03:38 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-05-04 17:47:31 -0400
commit6c0244091e8aa98e7977bdddeab2bb864cff9d91 (patch)
tree5c6a66c3bc1f19c3f3f2212d3290df48f9a3e770
parent6283f97d5fbfdd1e31694d7f6000eb728cdfba77 (diff)
ACPI / device_sysfs: Change _SUN and _STA show functions error return to EIO
The error return from a sysfs show function is passed up through the call chain and visible as the return from the read system call. The show functions for the _STA and _SUN object currently return -ENODEV. This patch changes the return to -EIO. ENODEV makes less sense since the "device' exists or there wouldn't be a sysfs file. Signed-off-by: Betty Dall <betty.dall@hpe.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r--drivers/acpi/device_sysfs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/acpi/device_sysfs.c b/drivers/acpi/device_sysfs.c
index 49cc0cbff0b8..e556a3ee202f 100644
--- a/drivers/acpi/device_sysfs.c
+++ b/drivers/acpi/device_sysfs.c
@@ -467,7 +467,7 @@ acpi_device_sun_show(struct device *dev, struct device_attribute *attr,
467 467
468 status = acpi_evaluate_integer(acpi_dev->handle, "_SUN", NULL, &sun); 468 status = acpi_evaluate_integer(acpi_dev->handle, "_SUN", NULL, &sun);
469 if (ACPI_FAILURE(status)) 469 if (ACPI_FAILURE(status))
470 return -ENODEV; 470 return -EIO;
471 471
472 return sprintf(buf, "%llu\n", sun); 472 return sprintf(buf, "%llu\n", sun);
473} 473}
@@ -496,7 +496,7 @@ static ssize_t status_show(struct device *dev, struct device_attribute *attr,
496 496
497 status = acpi_evaluate_integer(acpi_dev->handle, "_STA", NULL, &sta); 497 status = acpi_evaluate_integer(acpi_dev->handle, "_STA", NULL, &sta);
498 if (ACPI_FAILURE(status)) 498 if (ACPI_FAILURE(status))
499 return -ENODEV; 499 return -EIO;
500 500
501 return sprintf(buf, "%llu\n", sta); 501 return sprintf(buf, "%llu\n", sta);
502} 502}