[Concept,03/25] smbios: Correct logic in smbios_get_header()

Message ID 20250903133639.3235920-4-sjg@u-boot.org
State New
Headers
Series Selection of devicetree using CHIDs |

Commit Message

Simon Glass Sept. 3, 2025, 1:36 p.m. UTC
  From: Simon Glass <sjg@chromium.org>

This function skips over every second table. Fix it by dropping the
extra iterator update.

Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: a68c0625aab ("smbios: coreboot: Update smbios_get_header() to..")
---

 lib/smbios-parser.c | 2 --
 1 file changed, 2 deletions(-)
  

Patch

diff --git a/lib/smbios-parser.c b/lib/smbios-parser.c
index 575472f95a2..d8dc25da6ce 100644
--- a/lib/smbios-parser.c
+++ b/lib/smbios-parser.c
@@ -71,8 +71,6 @@  const struct smbios_header *smbios_get_header(const struct smbios_info *info,
 	     header = smbios_next_table(info, header)) {
 		if (header->type == type)
 			return header;
-
-		header = smbios_next_table(info, header);
 	}
 
 	return NULL;