summaryrefslogtreecommitdiffstats
path: root/fs/sysfs/bin.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dtor_core@ameritech.net>2005-04-29 01:22:00 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2005-06-20 15:15:02 -0700
commitc76d0abd07a9c9cf72bbb5b641e1e97f92ea8f3e (patch)
treec5f3c752031dfb8b7c5a624d06b129661eec5665 /fs/sysfs/bin.c
parentd48593bf208e0d046c35fb0707ae5b23fef8c4ff (diff)
downloadlinux-stable-c76d0abd07a9c9cf72bbb5b641e1e97f92ea8f3e.tar.gz
linux-stable-c76d0abd07a9c9cf72bbb5b641e1e97f92ea8f3e.tar.bz2
linux-stable-c76d0abd07a9c9cf72bbb5b641e1e97f92ea8f3e.zip
[PATCH] sysfs: if show/store is missing return -EIO
sysfs: if attribute does not implement show or store method read/write should return -EIO instead of 0 or -EINVAL. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'fs/sysfs/bin.c')
-rw-r--r--fs/sysfs/bin.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/sysfs/bin.c b/fs/sysfs/bin.c
index d4aaa88d0214..78899eeab974 100644
--- a/fs/sysfs/bin.c
+++ b/fs/sysfs/bin.c
@@ -25,7 +25,7 @@ fill_read(struct dentry *dentry, char *buffer, loff_t off, size_t count)
struct kobject * kobj = to_kobj(dentry->d_parent);
if (!attr->read)
- return -EINVAL;
+ return -EIO;
return attr->read(kobj, buffer, off, count);
}
@@ -71,7 +71,7 @@ flush_write(struct dentry *dentry, char *buffer, loff_t offset, size_t count)
struct kobject *kobj = to_kobj(dentry->d_parent);
if (!attr->write)
- return -EINVAL;
+ return -EIO;
return attr->write(kobj, buffer, offset, count);
}