Commit 4ea1b0f4 authored by Dmitriy Monakhov's avatar Dmitriy Monakhov Committed by Linus Torvalds

floppy: handle device_create_file() failure while init

This patch kills the "ignoring return value of 'device_create_file'"
warning message.
Signed-off-by: default avatarMonakhov Dmitriy <dmonakhov@openvz.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 6de2d202
...@@ -4334,7 +4334,10 @@ static int __init floppy_init(void) ...@@ -4334,7 +4334,10 @@ static int __init floppy_init(void)
if (err) if (err)
goto out_flush_work; 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... */ /* to be cleaned up... */
disks[drive]->private_data = (void *)(long)drive; disks[drive]->private_data = (void *)(long)drive;
disks[drive]->queue = floppy_queue; disks[drive]->queue = floppy_queue;
...@@ -4345,6 +4348,8 @@ static int __init floppy_init(void) ...@@ -4345,6 +4348,8 @@ static int __init floppy_init(void)
return 0; return 0;
out_unreg_platform_dev:
platform_device_unregister(&floppy_device[drive]);
out_flush_work: out_flush_work:
flush_scheduled_work(); flush_scheduled_work();
if (usage_count) if (usage_count)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment