gpu: nova-core: vbios: stop scanning at BIOS_MAX_SCAN_LEN

Current code lets `current_offset` go to `BIOS_MAX_SCAN_LEN` which is
one byte too far.

Fixes: 6fda04e7f0 ("gpu: nova-core: vbios: Add base support for VBIOS construction and iteration")
Reviewed-by: Joel Fernandes <joelagnelf@nvidia.com>
Reviewed-by: John Hubbard <jhubbard@nvidia.com>
Signed-off-by: Eliot Courtney <ecourtney@nvidia.com>
Link: https://patch.msgid.link/20260525-fix-vbios-v5-1-e5e455251537@nvidia.com
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
This commit is contained in:
Eliot Courtney 2026-05-25 22:57:19 +09:00 committed by Danilo Krummrich
parent 8bfe9d72cf
commit fc7c1054b6

View File

@ -272,7 +272,7 @@ fn next(&mut self) -> Option<Self::Item> {
return None;
}
if self.current_offset > BIOS_MAX_SCAN_LEN {
if self.current_offset >= BIOS_MAX_SCAN_LEN {
dev_err!(self.dev, "Error: exceeded BIOS scan limit, stopping scan\n");
return None;
}