diff options
author | Tao Bao <tbao@google.com> | 2017-02-10 00:38:09 +0100 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2017-02-10 00:38:09 +0100 |
commit | 30c164411facb976a3e3738958e5d3567d4e99e0 (patch) | |
tree | bd861977257712c80093496d87324661715b672d /minui/graphics_adf.cpp | |
parent | Merge "minui: Clean up graphics_fbdev.cpp." am: 5121961421 (diff) | |
parent | Merge "minui: Save errno before calling close()." (diff) | |
download | android_bootable_recovery-30c164411facb976a3e3738958e5d3567d4e99e0.tar android_bootable_recovery-30c164411facb976a3e3738958e5d3567d4e99e0.tar.gz android_bootable_recovery-30c164411facb976a3e3738958e5d3567d4e99e0.tar.bz2 android_bootable_recovery-30c164411facb976a3e3738958e5d3567d4e99e0.tar.lz android_bootable_recovery-30c164411facb976a3e3738958e5d3567d4e99e0.tar.xz android_bootable_recovery-30c164411facb976a3e3738958e5d3567d4e99e0.tar.zst android_bootable_recovery-30c164411facb976a3e3738958e5d3567d4e99e0.zip |
Diffstat (limited to 'minui/graphics_adf.cpp')
-rw-r--r-- | minui/graphics_adf.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/minui/graphics_adf.cpp b/minui/graphics_adf.cpp index 17f30d1d4..9ab0b06bf 100644 --- a/minui/graphics_adf.cpp +++ b/minui/graphics_adf.cpp @@ -67,8 +67,9 @@ static int adf_surface_init(adf_pdata* pdata, drm_mode_modeinfo* mode, adf_surfa surf->base.data = static_cast<uint8_t*>(mmap(nullptr, surf->pitch * surf->base.height, PROT_WRITE, MAP_SHARED, surf->fd, surf->offset)); if (surf->base.data == MAP_FAILED) { + int saved_errno = errno; close(surf->fd); - return -errno; + return -saved_errno; } return 0; |