diff options
author | Dmitriy Monakhov <dmonakhov@sw.ru> | 2007-05-08 03:25:58 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-08 14:15:02 -0400 |
commit | 4ea1b0f4c4f656e0838a937c47be9544ed1c5118 (patch) | |
tree | 59a0680541a761968f6effaf9a5237200926da2e /drivers/block | |
parent | 6de2d20235a2b8c751d39ec4b68347d66b19d815 (diff) |
floppy: handle device_create_file() failure while init
This patch kills the "ignoring return value of 'device_create_file'"
warning message.
Signed-off-by: Monakhov Dmitriy <dmonakhov@openvz.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/floppy.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c index 5231ed7e723f..3587cb434371 100644 --- a/drivers/block/floppy.c +++ b/drivers/block/floppy.c | |||
@@ -4334,7 +4334,10 @@ static int __init floppy_init(void) | |||
4334 | if (err) | 4334 | if (err) |
4335 | goto out_flush_work; | 4335 | goto out_flush_work; |
4336 | 4336 | ||
4337 | device_create_file(&floppy_device[drive].dev,&dev_attr_cmos); | 4337 | err = device_create_file(&floppy_device[drive].dev,&dev_attr_cmos); |
4338 | if (err) | ||
4339 | goto out_unreg_platform_dev; | ||
4340 | |||
4338 | /* to be cleaned up... */ | 4341 | /* to be cleaned up... */ |
4339 | disks[drive]->private_data = (void *)(long)drive; | 4342 | disks[drive]->private_data = (void *)(long)drive; |
4340 | disks[drive]->queue = floppy_queue; | 4343 | disks[drive]->queue = floppy_queue; |
@@ -4345,6 +4348,8 @@ static int __init floppy_init(void) | |||
4345 | 4348 | ||
4346 | return 0; | 4349 | return 0; |
4347 | 4350 | ||
4351 | out_unreg_platform_dev: | ||
4352 | platform_device_unregister(&floppy_device[drive]); | ||
4348 | out_flush_work: | 4353 | out_flush_work: |
4349 | flush_scheduled_work(); | 4354 | flush_scheduled_work(); |
4350 | if (usage_count) | 4355 | if (usage_count) |