derekf pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=70c1ce3be376ed29a25247b2d8c13e4d73edae64

commit 70c1ce3be376ed29a25247b2d8c13e4d73edae64
Author: Derek Foreman <der...@osg.samsung.com>
Date:   Thu Aug 3 15:09:06 2017 -0500

    ecore_drm2: Remove useless safety checks
    
    Now that the device is opened and found in one operation it's impossible
    to have fd == -1, so we can stop testing for it.
---
 src/lib/ecore_drm2/ecore_drm2_device.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/src/lib/ecore_drm2/ecore_drm2_device.c 
b/src/lib/ecore_drm2/ecore_drm2_device.c
index 7ec429523b..e5a41fd9c8 100644
--- a/src/lib/ecore_drm2/ecore_drm2_device.c
+++ b/src/lib/ecore_drm2/ecore_drm2_device.c
@@ -701,7 +701,6 @@ ecore_drm2_device_clock_id_get(Ecore_Drm2_Device *device)
    int ret;
 
    EINA_SAFETY_ON_NULL_RETURN_VAL(device, -1);
-   EINA_SAFETY_ON_TRUE_RETURN_VAL((device->fd < 0), -1);
 
    ret = sym_drmGetCap(device->fd, DRM_CAP_TIMESTAMP_MONOTONIC, &caps);
    if ((ret == 0) && (caps == 1))
@@ -717,7 +716,6 @@ ecore_drm2_device_cursor_size_get(Ecore_Drm2_Device 
*device, int *width, int *he
    int ret;
 
    EINA_SAFETY_ON_NULL_RETURN(device);
-   EINA_SAFETY_ON_TRUE_RETURN((device->fd < 0));
 
    if (width)
      {
@@ -857,7 +855,6 @@ ecore_drm2_device_prefer_shadow(Ecore_Drm2_Device *device)
    int ret;
 
    EINA_SAFETY_ON_NULL_RETURN_VAL(device, EINA_FALSE);
-   EINA_SAFETY_ON_TRUE_RETURN_VAL((device->fd < 0), EINA_FALSE);
 
    ret = sym_drmGetCap(device->fd, DRM_CAP_DUMB_PREFER_SHADOW, &caps);
    if ((ret == 0) && (caps == 1))

-- 


Reply via email to