aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/class.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/base/class.c')
-rw-r--r--drivers/base/class.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/base/class.c b/drivers/base/class.c
index ff33ebbf1dc7..344b8cd73901 100644
--- a/drivers/base/class.c
+++ b/drivers/base/class.c
@@ -26,7 +26,7 @@ class_attr_show(struct kobject * kobj, struct attribute * attr, char * buf)
26{ 26{
27 struct class_attribute * class_attr = to_class_attr(attr); 27 struct class_attribute * class_attr = to_class_attr(attr);
28 struct class * dc = to_class(kobj); 28 struct class * dc = to_class(kobj);
29 ssize_t ret = 0; 29 ssize_t ret = -EIO;
30 30
31 if (class_attr->show) 31 if (class_attr->show)
32 ret = class_attr->show(dc, buf); 32 ret = class_attr->show(dc, buf);
@@ -39,7 +39,7 @@ class_attr_store(struct kobject * kobj, struct attribute * attr,
39{ 39{
40 struct class_attribute * class_attr = to_class_attr(attr); 40 struct class_attribute * class_attr = to_class_attr(attr);
41 struct class * dc = to_class(kobj); 41 struct class * dc = to_class(kobj);
42 ssize_t ret = 0; 42 ssize_t ret = -EIO;
43 43
44 if (class_attr->store) 44 if (class_attr->store)
45 ret = class_attr->store(dc, buf, count); 45 ret = class_attr->store(dc, buf, count);