lkml.org 
[lkml]   [2007]   [Mar]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH][5/5][resend] floppy.c: Fix device_create_file() warning
On Mon, 19 Mar 2007 18:42:22 +0100, Jesper Juhl wrote:
> --- a/drivers/block/floppy.c
> +++ b/drivers/block/floppy.c
> @@ -4302,7 +4302,12 @@ 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_flush_work;
> +
> /* to be cleaned up... */
> disks[drive]->private_data = (void *)(long)drive;
> disks[drive]->queue = floppy_queue;

The floppy driver's sysfs file just provides some auxiliary
information to user-space, none of which matters for most of
its users. It is IMO totally inappropriate to fail floppy
driver init in this case.

/Mikael
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-03-20 09:35    [W:2.005 / U:0.712 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site