[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <4880AA39.76E4.0078.0@novell.com>
Date: Fri, 18 Jul 2008 13:35:37 +0100
From: "Jan Beulich" <jbeulich@...ell.com>
To: <mingo@...e.hu>, <tglx@...utronix.de>, <hpa@...or.com>
Cc: <linux-kernel@...r.kernel.org>
Subject: [PATCH] x86: check function status in EDD boot code
Without checking the return value of get_edd_info() and adding the
entry only in the success case, 6 devices show up under
/sys/firmware/edd/, no matter how many devices are actually present.
Signed-off-by: Jan Beulich <jbeulich@...ell.com>
---
arch/x86/boot/edd.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
--- linux-2.6.26/arch/x86/boot/edd.c 2008-07-13 23:51:29.000000000 +0200
+++ 2.6.26-x86-edd/arch/x86/boot/edd.c 2008-07-15 19:20:52.000000000 +0200
@@ -167,9 +167,8 @@ void query_edd(void)
* Scan the BIOS-supported hard disks and query EDD
* information...
*/
- get_edd_info(devno, &ei);
-
- if (boot_params.eddbuf_entries < EDDMAXNR) {
+ if (!get_edd_info(devno, &ei)
+ && boot_params.eddbuf_entries < EDDMAXNR) {
memcpy(edp, &ei, sizeof ei);
edp++;
boot_params.eddbuf_entries++;
--
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