diff options
author | Dmitry Torokhov <dtor_core@ameritech.net> | 2005-04-29 06:22:00 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-06-20 22:15:02 (GMT) |
commit | c76d0abd07a9c9cf72bbb5b641e1e97f92ea8f3e (patch) | |
tree | c5f3c752031dfb8b7c5a624d06b129661eec5665 /fs/sysfs/file.c | |
parent | d48593bf208e0d046c35fb0707ae5b23fef8c4ff (diff) | |
download | linux-c76d0abd07a9c9cf72bbb5b641e1e97f92ea8f3e.tar.xz |
[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/file.c')
-rw-r--r-- | fs/sysfs/file.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c index 3642080..1481cae 100644 --- a/fs/sysfs/file.c +++ b/fs/sysfs/file.c @@ -23,7 +23,7 @@ subsys_attr_show(struct kobject * kobj, struct attribute * attr, char * page) { struct subsystem * s = to_subsys(kobj); struct subsys_attribute * sattr = to_sattr(attr); - ssize_t ret = 0; + ssize_t ret = -EIO; if (sattr->show) ret = sattr->show(s,page); @@ -36,7 +36,7 @@ subsys_attr_store(struct kobject * kobj, struct attribute * attr, { struct subsystem * s = to_subsys(kobj); struct subsys_attribute * sattr = to_sattr(attr); - ssize_t ret = 0; + ssize_t ret = -EIO; if (sattr->store) ret = sattr->store(s,page,count); |