lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <200702060030.33671.jesper.juhl@gmail.com>
Date:	Tue, 6 Feb 2007 00:30:33 +0100
From:	Jesper Juhl <jesper.juhl@...il.com>
To:	linux-kernel@...r.kernel.org
Cc:	Andi Kleen <ak@...e.de>,
	Trent Waddington <trent.waddington@...il.com>,
	Bartlomiej Zolnierkiewicz <bzolnier@...il.com>,
	Alan Cox <alan@...rguk.ukuu.org.uk>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Jesper Juhl <jesper.juhl@...il.com>
Subject: [PATCH][5/5] floppy.c: Fix device_create_file() warning


This fixes the warning 
  warning: ignoring return value of `device_create_file', declared with attribute warn_unused_result
in function `floppy_init'. It does this by checking the return value and 
printing a warning message in case of no success.


Signed-off-by: Jesper Juhl <jesper.juhl@...il.com>
---

 floppy.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

--- linux-2.6.20/drivers/block/floppy.c.patch4	2007-02-05 23:22:26.000000000 +0100
+++ linux-2.6.20/drivers/block/floppy.c	2007-02-05 23:32:42.000000000 +0100
@@ -4302,7 +4302,12 @@
 		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)
+			printk(KERN_WARNING "Unable to create sysfs attribute "
+				"file for floppy device: %s\n", 
+				floppy_device[drive].name);
+
 		/* to be cleaned up... */
 		disks[drive]->private_data = (void *)(long)drive;
 		disks[drive]->queue = floppy_queue;



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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ