mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +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>
This commit is contained in:
parent
7dcac3d55b
commit
77f7147cea
1 changed files with 1 additions and 3 deletions
|
|
@ -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