From: Jan Beulich Date: Fri, 18 Jul 2008 12:35:37 +0000 (+0100) Subject: x86: check function status in EDD boot code X-Git-Tag: v2.6.27-rc1~955^2~1^15 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=f2ba93929fdb91fd806be20e959a50f7db82790e;p=linux-2.6-omap-h63xx.git 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 Signed-off-by: H. Peter Anvin --- diff --git a/arch/x86/boot/edd.c b/arch/x86/boot/edd.c index 03399d64013..d93cbc6464d 100644 --- a/arch/x86/boot/edd.c +++ b/arch/x86/boot/edd.c @@ -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++;