From c6a6d36255eb6f835e7d6e1c2e2ab4c8ffa9d143 Mon Sep 17 00:00:00 2001 From: Chih-Wei Huang Date: Mon, 11 Jul 2016 19:37:18 +0800 Subject: gralloc_drm: show the unsupported error if drv is null The unsupported driver message was suppressed by a subtle bug of commit cbf96c0d which treats the latest checking as an else case. Remove the unnecessary else. Besides, logically on entering ENABLE_PIPE snippet, drv is always null. No need to check it. --- gralloc_drm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gralloc_drm.c b/gralloc_drm.c index 40342cb..49ae7d7 100644 --- a/gralloc_drm.c +++ b/gralloc_drm.c @@ -93,10 +93,10 @@ init_drv_from_fd(int fd) } else #endif #ifdef ENABLE_PIPE - if (!drv) { + { drv = gralloc_drm_drv_create_for_pipe(fd, version->name); ALOGI_IF(drv, "create pipe for driver %s", version->name); - } else + } #endif if (!drv) { ALOGE("unsupported driver: %s", (version->name) ? -- cgit v1.1