Commit f2ba9392 authored by Jan Beulich's avatar Jan Beulich Committed by H. Peter Anvin

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: default avatarJan Beulich <jbeulich@novell.com>
Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
parent ffaa152e
...@@ -167,9 +167,8 @@ void query_edd(void) ...@@ -167,9 +167,8 @@ void query_edd(void)
* Scan the BIOS-supported hard disks and query EDD * Scan the BIOS-supported hard disks and query EDD
* information... * information...
*/ */
get_edd_info(devno, &ei); if (!get_edd_info(devno, &ei)
&& boot_params.eddbuf_entries < EDDMAXNR) {
if (boot_params.eddbuf_entries < EDDMAXNR) {
memcpy(edp, &ei, sizeof ei); memcpy(edp, &ei, sizeof ei);
edp++; edp++;
boot_params.eddbuf_entries++; boot_params.eddbuf_entries++;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment