projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
38f3237
)
Properly check mmap return value
author
Hanno Böck
<hanno@gentoo.org>
Thu, 21 May 2020 16:51:06 +0000
(18:51 +0200)
committer
Marge Bot
<eric+marge@anholt.net>
Fri, 22 May 2020 17:15:30 +0000
(17:15 +0000)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5150>
src/freedreno/perfcntrs/fdperf.c
patch
|
blob
|
history
diff --git
a/src/freedreno/perfcntrs/fdperf.c
b/src/freedreno/perfcntrs/fdperf.c
index cc5e90c39d90b45581823dacc6d1d2a14d54452f..976f6ee77bb465aaa42c0bbb15d218a5107be712 100644
(file)
--- a/
src/freedreno/perfcntrs/fdperf.c
+++ b/
src/freedreno/perfcntrs/fdperf.c
@@
-332,7
+332,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");
}