summaryrefslogtreecommitdiffstats
path: root/drivers/dio/dio-sysfs.c
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2008-12-30 14:16:41 +0100
committerGeert Uytterhoeven <geert@linux-m68k.org>2009-01-12 20:56:41 +0100
commit2e4c77bea3d8b17d94f8ee382411f359b708560f (patch)
treed6b4bb05094e709b164cfcdd02fed4bea9f90cc8 /drivers/dio/dio-sysfs.c
parent639274d8106e25c2f91bf92270f46aaa3d104040 (diff)
downloadlinux-2e4c77bea3d8b17d94f8ee382411f359b708560f.tar.bz2
m68k: dio - Kill warn_unused_result warnings
warning: ignoring return value of 'device_register', declared with attribute warn_unused_result warning: ignoring return value of 'device_create_file', declared with attribute warn_unused_result Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
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
}
static DEVICE_ATTR(resource, S_IRUGO, dio_show_resource, NULL);
-void dio_create_sysfs_dev_files(struct dio_dev *d)
+int dio_create_sysfs_dev_files(struct dio_dev *d)
{
struct device *dev = &d->dev;
+ int error;
/* current configuration's attributes */
- device_create_file(dev, &dev_attr_id);
- device_create_file(dev, &dev_attr_ipl);
- device_create_file(dev, &dev_attr_secid);
- device_create_file(dev, &dev_attr_name);
- device_create_file(dev, &dev_attr_resource);
+ if ((error = device_create_file(dev, &dev_attr_id)) ||
+ (error = device_create_file(dev, &dev_attr_ipl)) ||
+ (error = device_create_file(dev, &dev_attr_secid)) ||
+ (error = device_create_file(dev, &dev_attr_name)) ||
+ (error = device_create_file(dev, &dev_attr_resource)))
+ return error;
+
+ return 0;
}