aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/core/sysfs.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dtor_core@ameritech.net>2005-04-29 02:27:34 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2005-06-20 18:15:03 -0400
commit70f2817a43c89b784dc2ec3d06ba5bf3064f8235 (patch)
tree210bbd16599d4e402051e4ec30c82e70b8b427ef /drivers/infiniband/core/sysfs.c
parent6c1852a08e444a2e66367352a99c0e93c8bf3e97 (diff)
[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>
Diffstat (limited to 'drivers/infiniband/core/sysfs.c')
-rw-r--r--drivers/infiniband/core/sysfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/core/sysfs.c b/drivers/infiniband/core/sysfs.c
index 5febd6d8b885..90d51b179abe 100644
--- a/drivers/infiniband/core/sysfs.c
+++ b/drivers/infiniband/core/sysfs.c
@@ -71,7 +71,7 @@ static ssize_t port_attr_show(struct kobject *kobj,
71 struct ib_port *p = container_of(kobj, struct ib_port, kobj); 71 struct ib_port *p = container_of(kobj, struct ib_port, kobj);
72 72
73 if (!port_attr->show) 73 if (!port_attr->show)
74 return 0; 74 return -EIO;
75 75
76 return port_attr->show(p, port_attr, buf); 76 return port_attr->show(p, port_attr, buf);
77} 77}