mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 10:49:33 +00:00
drm/nouveau/bios: return actual size of the buffer retrieved via _ROM
Fixes detection of a failed attempt at fetching the entire ROM image in one-shot (a violation of the spec, that works a lot of the time). Tested on a HP Zbook 15 G2. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
parent
950950327b
commit
954329412e
1 changed files with 1 additions and 0 deletions
|
@ -367,6 +367,7 @@ static int nouveau_rom_call(acpi_handle rom_handle, uint8_t *bios,
|
|||
return -ENODEV;
|
||||
}
|
||||
obj = (union acpi_object *)buffer.pointer;
|
||||
len = min(len, (int)obj->buffer.length);
|
||||
memcpy(bios+offset, obj->buffer.pointer, len);
|
||||
kfree(buffer.pointer);
|
||||
return len;
|
||||
|
|
Loading…
Reference in a new issue