diff options
author | Dmitry Torokhov <dtor_core@ameritech.net> | 2005-04-29 02:26:06 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-06-20 18:15:03 -0400 |
commit | 6c1852a08e444a2e66367352a99c0e93c8bf3e97 (patch) | |
tree | ffa075f75b7eb0e5b1399aeb8e34e6cf9a631a10 /drivers/block/ll_rw_blk.c | |
parent | fc7e4828995d8c9e4c9597f8a19179e4ab53f73e (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/ll_rw_blk.c')
-rw-r--r-- | drivers/block/ll_rw_blk.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/block/ll_rw_blk.c b/drivers/block/ll_rw_blk.c index f20eba22b14b..81fe3a0c1fe7 100644 --- a/drivers/block/ll_rw_blk.c +++ b/drivers/block/ll_rw_blk.c | |||
@@ -3574,7 +3574,7 @@ queue_attr_show(struct kobject *kobj, struct attribute *attr, char *page) | |||
3574 | 3574 | ||
3575 | q = container_of(kobj, struct request_queue, kobj); | 3575 | q = container_of(kobj, struct request_queue, kobj); |
3576 | if (!entry->show) | 3576 | if (!entry->show) |
3577 | return 0; | 3577 | return -EIO; |
3578 | 3578 | ||
3579 | return entry->show(q, page); | 3579 | return entry->show(q, page); |
3580 | } | 3580 | } |
@@ -3588,7 +3588,7 @@ queue_attr_store(struct kobject *kobj, struct attribute *attr, | |||
3588 | 3588 | ||
3589 | q = container_of(kobj, struct request_queue, kobj); | 3589 | q = container_of(kobj, struct request_queue, kobj); |
3590 | if (!entry->store) | 3590 | if (!entry->store) |
3591 | return -EINVAL; | 3591 | return -EIO; |
3592 | 3592 | ||
3593 | return entry->store(q, page, length); | 3593 | return entry->store(q, page, length); |
3594 | } | 3594 | } |