[PATCH] sysfs: (rest) if show/store is missing return -EIO

sysfs: fix the rest of the kernel so if an attribute doesn't
       implement show or store method read/write will return
       -EIO instead of 0 or -EINVAL or -EPERM.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Dmitry Torokhov
2005-04-29 01:27:34 -05:00
committed by Greg Kroah-Hartman
parent 6c1852a08e
commit 70f2817a43
7 changed files with 12 additions and 12 deletions

View File

@@ -71,7 +71,7 @@ static ssize_t port_attr_show(struct kobject *kobj,
struct ib_port *p = container_of(kobj, struct ib_port, kobj);
if (!port_attr->show)
return 0;
return -EIO;
return port_attr->show(p, port_attr, buf);
}