Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1391347 > unrolled thread
| Started by | Betty Dall <betty.dall@hpe.com> |
|---|---|
| First post | 2016-04-29 21:30 +0200 |
| Last post | 2016-04-29 21:30 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH v2 2/3] ACPI/device_sysfs: Change _SUN and _STA show functions error return to EIO Betty Dall <betty.dall@hpe.com> - 2016-04-29 21:30 +0200
| From | Betty Dall <betty.dall@hpe.com> |
|---|---|
| Date | 2016-04-29 21:30 +0200 |
| Subject | [PATCH v2 2/3] ACPI/device_sysfs: Change _SUN and _STA show functions error return to EIO |
| Message-ID | <rtmgW-2ZR-1@gated-at.bofh.it> |
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> --- drivers/acpi/device_sysfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/device_sysfs.c b/drivers/acpi/device_sysfs.c index 49cc0cb..e556a3e 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, status = acpi_evaluate_integer(acpi_dev->handle, "_SUN", NULL, &sun); if (ACPI_FAILURE(status)) - return -ENODEV; + return -EIO; return sprintf(buf, "%llu\n", sun); } @@ -496,7 +496,7 @@ static ssize_t status_show(struct device *dev, struct device_attribute *attr, status = acpi_evaluate_integer(acpi_dev->handle, "_STA", NULL, &sta); if (ACPI_FAILURE(status)) - return -ENODEV; + return -EIO; return sprintf(buf, "%llu\n", sta); } -- 1.9.1
Back to top | Article view | linux.kernel
csiph-web