aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dio/dio-sysfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/dio/dio-sysfs.c')
-rw-r--r--drivers/dio/dio-sysfs.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/dio/dio-sysfs.c b/drivers/dio/dio-sysfs.c
index f46463038847..91d5f4da8769 100644
--- a/drivers/dio/dio-sysfs.c
+++ b/drivers/dio/dio-sysfs.c
@@ -63,15 +63,19 @@ static ssize_t dio_show_resource(struct device *dev, struct device_attribute *at
63} 63}
64static DEVICE_ATTR(resource, S_IRUGO, dio_show_resource, NULL); 64static DEVICE_ATTR(resource, S_IRUGO, dio_show_resource, NULL);
65 65
66void dio_create_sysfs_dev_files(struct dio_dev *d) 66int dio_create_sysfs_dev_files(struct dio_dev *d)
67{ 67{
68 struct device *dev = &d->dev; 68 struct device *dev = &d->dev;
69 int error;
69 70
70 /* current configuration's attributes */ 71 /* current configuration's attributes */
71 device_create_file(dev, &dev_attr_id); 72 if ((error = device_create_file(dev, &dev_attr_id)) ||
72 device_create_file(dev, &dev_attr_ipl); 73 (error = device_create_file(dev, &dev_attr_ipl)) ||
73 device_create_file(dev, &dev_attr_secid); 74 (error = device_create_file(dev, &dev_attr_secid)) ||
74 device_create_file(dev, &dev_attr_name); 75 (error = device_create_file(dev, &dev_attr_name)) ||
75 device_create_file(dev, &dev_attr_resource); 76 (error = device_create_file(dev, &dev_attr_resource)))
77 return error;
78
79 return 0;
76} 80}
77 81