summaryrefslogtreecommitdiff
path: root/cpu_ref/rsCpuIntrinsicColorMatrix.cpp
diff options
context:
space:
mode:
authorJason Sams <jsams@google.com>2014-10-09 12:50:19 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-10-09 12:50:19 +0000
commit09d7d5993e75e22ade6b37bc98c42d30a81ec6af (patch)
tree648f0d77a91dad4361042d975f3154d945287a4e /cpu_ref/rsCpuIntrinsicColorMatrix.cpp
parent3e8d240af4e4b77d1a4903548c3757cbc15420a5 (diff)
parentc214fe59fc48740ed003a3cde4e5a60517c5d5ce (diff)
am c214fe59: Fix incorrect error check for mmap
* commit 'c214fe59fc48740ed003a3cde4e5a60517c5d5ce': Fix incorrect error check for mmap
Diffstat (limited to 'cpu_ref/rsCpuIntrinsicColorMatrix.cpp')
-rw-r--r--cpu_ref/rsCpuIntrinsicColorMatrix.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/cpu_ref/rsCpuIntrinsicColorMatrix.cpp b/cpu_ref/rsCpuIntrinsicColorMatrix.cpp
index d9c0ded6..64ce43f4 100644
--- a/cpu_ref/rsCpuIntrinsicColorMatrix.cpp
+++ b/cpu_ref/rsCpuIntrinsicColorMatrix.cpp
@@ -486,7 +486,8 @@ bool RsdCpuScriptIntrinsicColorMatrix::build(Key_t key) {
//StopWatch build_time("rs cm: build time");
mBuf = (uint8_t *)mmap(0, mBufSize, PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_ANON, -1, 0);
- if (!mBuf) {
+ if (mBuf == MAP_FAILED) {
+ mBuf = NULL;
return false;
}