summaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorDmitriy Monakhov <dmonakhov@sw.ru>2007-05-08 09:25:58 +0200
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-08 20:15:02 +0200
commit4ea1b0f4c4f656e0838a937c47be9544ed1c5118 (patch)
tree59a0680541a761968f6effaf9a5237200926da2e /drivers/block
parentreplace pci_find_device in drivers/telephony/ixj.c (diff)
downloadlinux-4ea1b0f4c4f656e0838a937c47be9544ed1c5118.tar.xz
linux-4ea1b0f4c4f656e0838a937c47be9544ed1c5118.zip
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.c7
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)
if (err)
goto out_flush_work;
- device_create_file(&floppy_device[drive].dev,&dev_attr_cmos);
+ err = device_create_file(&floppy_device[drive].dev,&dev_attr_cmos);
+ if (err)
+ goto out_unreg_platform_dev;
+
/* to be cleaned up... */
disks[drive]->private_data = (void *)(long)drive;
disks[drive]->queue = floppy_queue;
@@ -4345,6 +4348,8 @@ static int __init floppy_init(void)
return 0;
+out_unreg_platform_dev:
+ platform_device_unregister(&floppy_device[drive]);
out_flush_work:
flush_scheduled_work();
if (usage_count)