mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 04:38:03 +02:00
pan/kmod: fix propagation of MAP_FAILED in pan_kmod_bo_mmap
All current callers check for MAP_FAILED, not NULL, and we are returning MAP_FAILED already on the other error paths. Fixes:d5f4f918f3("panfrost: clean up mmap-diagnostics") Signed-off-by: Olivia Lee <olivia.lee@collabora.com> Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com> Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36122> (cherry picked from commit77f7147cea)
This commit is contained in:
parent
331a5c7646
commit
6a2ba45e71
2 changed files with 2 additions and 4 deletions
|
|
@ -194,7 +194,7 @@
|
|||
"description": "pan/kmod: fix propagation of MAP_FAILED in pan_kmod_bo_mmap",
|
||||
"nominated": true,
|
||||
"nomination_type": 2,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "d5f4f918f37491fd9fd944230dd047575a53b24b",
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -625,11 +625,9 @@ pan_kmod_bo_mmap(struct pan_kmod_bo *bo, off_t bo_offset, size_t size, int prot,
|
|||
|
||||
host_addr = os_mmap(host_addr, size, prot, flags, bo->dev->fd,
|
||||
mmap_offset + bo_offset);
|
||||
if (host_addr == MAP_FAILED) {
|
||||
if (host_addr == MAP_FAILED)
|
||||
mesa_loge("mmap(..., size=%zu, prot=%d, flags=0x%x) failed: %s",
|
||||
size, prot, flags, strerror(errno));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return host_addr;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue