aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--com32/lib/syslinux/load_linux.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/com32/lib/syslinux/load_linux.c b/com32/lib/syslinux/load_linux.c
index 622c2ab2..856141f8 100644
--- a/com32/lib/syslinux/load_linux.c
+++ b/com32/lib/syslinux/load_linux.c
@@ -462,15 +462,15 @@ int syslinux_boot_linux(void *kernel_buf, size_t kernel_size,
addr_t best_addr = 0;
size_t size = sdp->hdr.len + sizeof(sdp->hdr);
+ if (!sdp->data || !sdp->hdr.len)
+ continue;
+
if (hdr.version < 0x0209) {
/* Setup data not supported */
errno = ENXIO; /* Kind of arbitrary... */
goto bail;
}
- if (!sdp->data || !sdp->hdr.len)
- continue;
-
for (ml = amap; ml->type != SMT_END; ml = ml->next) {
addr_t adj_start = (ml->start + align_mask) & ~align_mask;
addr_t adj_end = ml->next->start & ~align_mask;