Re: [PATCH][5/5][resend] floppy.c: Fix device_create_file() warning

From: Jesper Juhl
Date: Mon Mar 19 2007 - 11:16:42 EST


On 19/03/07, Andi Kleen <ak@xxxxxxx> wrote:

>
> - device_create_file(&floppy_device[drive].dev,&dev_attr_cmos);
> + err = device_create_file(&floppy_device[drive].dev, &dev_attr_cmos);
> + if (err)
> + printk(KERN_WARNING "Unable to create sysfs attribute "
> + "file for floppy device: %s\n",
> + floppy_device[drive].name);

That change looks pretty useless. Either the error should be handled correctly
by bailing out or the warn_unused_results should be dropped.

At least letting the user know that something failed is better than
the current situation of just failing silently I'd say.

--
Jesper Juhl <jesper.juhl@xxxxxxxxx>
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please http://www.expita.com/nomime.html
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/