diff --git a/.pick_status.json b/.pick_status.json index f7596e66b75..7c3a75daac4 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -2874,7 +2874,7 @@ "description": "llvmpipe: fix udmabuf mmap error check", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "d74ea2c117fe96e527471e572336f931c3c77da1", "notes": null diff --git a/src/gallium/drivers/llvmpipe/lp_texture.c b/src/gallium/drivers/llvmpipe/lp_texture.c index 91355060ea5..104800ef0cc 100644 --- a/src/gallium/drivers/llvmpipe/lp_texture.c +++ b/src/gallium/drivers/llvmpipe/lp_texture.c @@ -1415,8 +1415,7 @@ llvmpipe_resource_alloc_udmabuf(struct llvmpipe_screen *screen, struct pipe_memory_allocation *data = mmap(NULL, size, PROT_WRITE | PROT_READ, MAP_SHARED, mem_fd, 0); - - if (!data) + if (data == MAP_FAILED) goto fail; alloc->mem_fd = mem_fd;