diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2017-02-10 00:17:57 +0100 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2017-02-10 00:17:59 +0100 |
commit | df464dbe79202b62f8b2cf73f45e52d9f32e5e5e (patch) | |
tree | b2380e8f70e86581af453c9500a028d846d8bfd3 | |
parent | Merge "minui: Clean up graphics_fbdev.cpp." (diff) | |
parent | minui: Save errno before calling close(). (diff) | |
download | android_bootable_recovery-df464dbe79202b62f8b2cf73f45e52d9f32e5e5e.tar android_bootable_recovery-df464dbe79202b62f8b2cf73f45e52d9f32e5e5e.tar.gz android_bootable_recovery-df464dbe79202b62f8b2cf73f45e52d9f32e5e5e.tar.bz2 android_bootable_recovery-df464dbe79202b62f8b2cf73f45e52d9f32e5e5e.tar.lz android_bootable_recovery-df464dbe79202b62f8b2cf73f45e52d9f32e5e5e.tar.xz android_bootable_recovery-df464dbe79202b62f8b2cf73f45e52d9f32e5e5e.tar.zst android_bootable_recovery-df464dbe79202b62f8b2cf73f45e52d9f32e5e5e.zip |
-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; |