* [PATCH] floppy: handle device_create_file() failure while init
@ 2007-03-02 15:16 Dmitriy Monakhov
0 siblings, 0 replies; only message in thread
From: Dmitriy Monakhov @ 2007-03-02 15:16 UTC (permalink / raw)
To: linux-kernel; +Cc: spyro
This patch kills the "ignoring return value of 'device_create_file'"
warning message.
Signed-off-by: Monakhov Dmitriy <dmonakhov@openvz.org>
---
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 567c630..dfdabc3 100644
--- a/drivers/block/floppy.c
+++ b/drivers/block/floppy.c
@@ -4333,7 +4333,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;
@@ -4344,6 +4347,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)
--
1.4.4.2
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-03-02 15:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-02 15:16 [PATCH] floppy: handle device_create_file() failure while init Dmitriy Monakhov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®