diff options
author | Chandramohan | 2013-09-19 03:22:58 -0500 |
---|---|---|
committer | Gerrit Code Review | 2013-09-27 11:19:00 -0500 |
commit | 0223f6619d9bcb59f4cff42d01b65cedbf242c14 (patch) | |
tree | a85ecd8b783c41d24edebe925ac182f60f100d47 /libdce_linux.c | |
parent | ffb5c1de22eefd33ec0694c5590eb6fb50bd1771 (diff) | |
download | hardware-ti-libdce-0223f6619d9bcb59f4cff42d01b65cedbf242c14.tar.gz hardware-ti-libdce-0223f6619d9bcb59f4cff42d01b65cedbf242c14.tar.xz hardware-ti-libdce-0223f6619d9bcb59f4cff42d01b65cedbf242c14.zip |
[Linux] fixed an unreachable statement
Applications can optionally communicate the drm FD to libdce using
dce_set_fd before calling dce_init. In such cases dce_init will not
open a new DRM file descriptor. But for applications not using this
option, libdce will create a new fd for its use in dce_alloc.
The drmOpen call was unreachable in such cases and hence there was
an invalid handle. This patch fixes this issue of an unreachable
statement in dce_init
Change-Id: I4758416a7d34fff873c280f7583c05c1640c312b
Signed-off-by: Chandramohan <chandramohan.c@ti.com>
Signed-off-by: Amarinder Bindra <a-bindra@ti.com>
Diffstat (limited to 'libdce_linux.c')
-rw-r--r-- | libdce_linux.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libdce_linux.c b/libdce_linux.c index d7e6e8b..39a03e0 100644 --- a/libdce_linux.c +++ b/libdce_linux.c | |||
@@ -56,7 +56,7 @@ void *dce_init(void) | |||
56 | DEBUG(" >> dce_init"); | 56 | DEBUG(" >> dce_init"); |
57 | 57 | ||
58 | /* Open omapdrm device */ | 58 | /* Open omapdrm device */ |
59 | if( !OmapDrm_FD && OmapDrm_FD == INVALID_DRM_FD ) { | 59 | if( OmapDrm_FD == INVALID_DRM_FD ) { |
60 | DEBUG("Open omapdrm device"); | 60 | DEBUG("Open omapdrm device"); |
61 | OmapDrm_FD = drmOpen("omapdrm", "platform:omapdrm:00"); | 61 | OmapDrm_FD = drmOpen("omapdrm", "platform:omapdrm:00"); |
62 | _ASSERT(OmapDrm_FD > 0, DCE_EOMAPDRM_FAIL); | 62 | _ASSERT(OmapDrm_FD > 0, DCE_EOMAPDRM_FAIL); |