summaryrefslogtreecommitdiffstats
path: root/drivers/block/genhd.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dtor_core@ameritech.net>2005-04-29 01:26:06 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2005-06-20 15:15:03 -0700
commit6c1852a08e444a2e66367352a99c0e93c8bf3e97 (patch)
treeffa075f75b7eb0e5b1399aeb8e34e6cf9a631a10 /drivers/block/genhd.c
parentfc7e4828995d8c9e4c9597f8a19179e4ab53f73e (diff)
downloadop-kernel-dev-6c1852a08e444a2e66367352a99c0e93c8bf3e97.zip
op-kernel-dev-6c1852a08e444a2e66367352a99c0e93c8bf3e97.tar.gz
[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 8bbe01d..53f7d84 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,
struct gendisk *disk = to_disk(kobj);
struct disk_attribute *disk_attr =
container_of(attr,struct disk_attribute,attr);
- ssize_t ret = 0;
+ ssize_t ret = -EIO;
if (disk_attr->show)
ret = disk_attr->show(disk,page);
OpenPOWER on IntegriCloud