mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 17:47:41 +02:00
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:
parent
8bfe9d72cf
commit
fc7c1054b6
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user