mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 13:48:06 +02:00
Properly check mmap return value
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5150>
(cherry picked from commit be71e2fd08)
This commit is contained in:
parent
8cb8c7f0f1
commit
cb5d60b7d9
2 changed files with 2 additions and 2 deletions
|
|
@ -1300,7 +1300,7 @@
|
|||
"description": "Properly check mmap return value",
|
||||
"nominated": false,
|
||||
"nomination_type": null,
|
||||
"resolution": 4,
|
||||
"resolution": 1,
|
||||
"master_sha": null,
|
||||
"because_sha": null
|
||||
},
|
||||
|
|
|
|||
|
|
@ -396,7 +396,7 @@ find_device(void)
|
|||
err(1, "could not open /dev/mem");
|
||||
|
||||
dev.io = mmap(0, dev.size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, dev.base);
|
||||
if (!dev.io) {
|
||||
if (dev.io == MAP_FAILED) {
|
||||
close(fd);
|
||||
err(1, "could not map device");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue