diff options
author | Geert Uytterhoeven <geert@linux-m68k.org> | 2008-12-30 14:16:41 +0100 |
---|---|---|
committer | Geert Uytterhoeven <geert@linux-m68k.org> | 2009-01-12 20:56:41 +0100 |
commit | 2e4c77bea3d8b17d94f8ee382411f359b708560f (patch) | |
tree | d6b4bb05094e709b164cfcdd02fed4bea9f90cc8 /drivers/dio/dio.c | |
parent | 639274d8106e25c2f91bf92270f46aaa3d104040 (diff) |
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.c')
-rw-r--r-- | drivers/dio/dio.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/drivers/dio/dio.c b/drivers/dio/dio.c index 07f274f853d..10c3c498358 100644 --- a/drivers/dio/dio.c +++ b/drivers/dio/dio.c @@ -173,6 +173,7 @@ static int __init dio_init(void) mm_segment_t fs; int i; struct dio_dev *dev; + int error; if (!MACH_IS_HP300) return 0; @@ -182,7 +183,11 @@ static int __init dio_init(void) /* Initialize the DIO bus */ INIT_LIST_HEAD(&dio_bus.devices); strcpy(dio_bus.dev.bus_id, "dio"); - device_register(&dio_bus.dev); + error = device_register(&dio_bus.dev); + if (error) { + pr_err("DIO: Error registering dio_bus\n"); + return error; + } /* Request all resources */ dio_bus.num_resources = (hp300_model == HP_320 ? 1 : 2); @@ -252,8 +257,15 @@ static int __init dio_init(void) if (scode >= DIOII_SCBASE) iounmap(va); - device_register(&dev->dev); - dio_create_sysfs_dev_files(dev); + error = device_register(&dev->dev); + if (error) { + pr_err("DIO: Error registering device %s\n", + dev->name); + continue; + } + error = dio_create_sysfs_dev_files(dev); + if (error) + dev_err(&dev->dev, "Error creating sysfs files\n"); } return 0; } |