diff options
author | Dmitry Torokhov <dtor_core@ameritech.net> | 2005-04-29 01:23:47 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-06-20 15:15:02 -0700 |
commit | 4a0c20bf8c0fe2116f8fd7d3da6122bf8a01f026 (patch) | |
tree | 48b6108a889f7cc007633c4d7d6f2c9fafe18082 /drivers/base/sys.c | |
parent | c76d0abd07a9c9cf72bbb5b641e1e97f92ea8f3e (diff) | |
download | op-kernel-dev-4a0c20bf8c0fe2116f8fd7d3da6122bf8a01f026.zip op-kernel-dev-4a0c20bf8c0fe2116f8fd7d3da6122bf8a01f026.tar.gz |
[PATCH] sysfs: (driver/base) if show/store is missing return -EIO
sysfs: fix drivers/base so if an attribute doesn't implement
show or store method read/write will return -EIO
instead of 0.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/base/sys.c')
-rw-r--r-- | drivers/base/sys.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/base/sys.c b/drivers/base/sys.c index 9102e37..f37a13d 100644 --- a/drivers/base/sys.c +++ b/drivers/base/sys.c @@ -37,7 +37,7 @@ sysdev_show(struct kobject * kobj, struct attribute * attr, char * buffer) if (sysdev_attr->show) return sysdev_attr->show(sysdev, buffer); - return 0; + return -EIO; } @@ -50,7 +50,7 @@ sysdev_store(struct kobject * kobj, struct attribute * attr, if (sysdev_attr->store) return sysdev_attr->store(sysdev, buffer, count); - return 0; + return -EIO; } static struct sysfs_ops sysfs_ops = { |