[PATCH] sysfs: (rest) if show/store is missing return -EIO
[linux-2.6.git] / drivers / infiniband / core / sysfs.c
index 5febd6d..90d51b1 100644 (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);
 }