summaryrefslogtreecommitdiffstats
path: root/arch/x86/boot/edd.c
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@novell.com>2008-07-18 14:35:37 +0200
committerH. Peter Anvin <hpa@zytor.com>2008-07-18 23:33:17 +0200
commitf2ba93929fdb91fd806be20e959a50f7db82790e (patch)
treeca3518a85672e3da4e36884139707ae6577939d5 /arch/x86/boot/edd.c
parentMerge branch 'x86/setup' of ssh://master.kernel.org/pub/scm/linux/kernel/git/... (diff)
downloadlinux-f2ba93929fdb91fd806be20e959a50f7db82790e.tar.xz
linux-f2ba93929fdb91fd806be20e959a50f7db82790e.zip
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@novell.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch/x86/boot/edd.c')
-rw-r--r--arch/x86/boot/edd.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/x86/boot/edd.c b/arch/x86/boot/edd.c
index 03399d64013b..d93cbc6464d0 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++;