diff --git a/.pick_status.json b/.pick_status.json index 129127ea59c..5c3a399b0a5 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -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 }, diff --git a/src/freedreno/perfcntrs/fdperf.c b/src/freedreno/perfcntrs/fdperf.c index 3eb2f827a8d..e86595ae967 100644 --- a/src/freedreno/perfcntrs/fdperf.c +++ b/src/freedreno/perfcntrs/fdperf.c @@ -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"); }