aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/genhd.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dtor_core@ameritech.net>2005-04-29 02:26:06 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2005-06-20 18:15:03 -0400
commit6c1852a08e444a2e66367352a99c0e93c8bf3e97 (patch)
treeffa075f75b7eb0e5b1399aeb8e34e6cf9a631a10 /drivers/block/genhd.c
parentfc7e4828995d8c9e4c9597f8a19179e4ab53f73e (diff)
[PATCH] sysfs: (driver/block) if show/store is missing return -EIO
sysfs: fix drivers/block so if an attribute doesn't implement show or store method read/write will 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 'drivers/block/genhd.c')
-rw-r--r--drivers/block/genhd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/genhd.c b/drivers/block/genhd.c
index 8bbe01d4b487..53f7d846b747 100644
--- a/drivers/block/genhd.c
+++ b/drivers/block/genhd.c
@@ -322,7 +322,7 @@ static ssize_t disk_attr_show(struct kobject *kobj, struct attribute *attr,
322 struct gendisk *disk = to_disk(kobj); 322 struct gendisk *disk = to_disk(kobj);
323 struct disk_attribute *disk_attr = 323 struct disk_attribute *disk_attr =
324 container_of(attr,struct disk_attribute,attr); 324 container_of(attr,struct disk_attribute,attr);
325 ssize_t ret = 0; 325 ssize_t ret = -EIO;
326 326
327 if (disk_attr->show) 327 if (disk_attr->show)
328 ret = disk_attr->show(disk,page); 328 ret = disk_attr->show(disk,page);