diff mbox

[6/8] drmOpenByName: remove redundant drmAvailable check

Message ID 1393995704-29184-7-git-send-email-djkurtz@chromium.org (mailing list archive)
State New, archived
Headers show

Commit Message

Daniel Kurtz March 5, 2014, 5:01 a.m. UTC
drmOpenByName() is a static function that is only called by drmOpen().
drmOpen() already checks drmAvailable(), so the checki in
drmOpenByName() is redundant.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
---
 xf86drm.c | 13 -------------
 1 file changed, 13 deletions(-)
diff mbox

Patch

diff --git a/xf86drm.c b/xf86drm.c
index 720952f..118022c 100644
--- a/xf86drm.c
+++ b/xf86drm.c
@@ -537,19 +537,6 @@  static int drmOpenByName(const char *name)
     int           fd;
     drmVersionPtr version;
     char *        id;
-    
-    if (!drmAvailable()) {
-	if (!drm_server_info) {
-	    return -1;
-	}
-	else {
-	    /* try to load the kernel module now */
-	    if (!drm_server_info->load_module(name)) {
-		drmMsg("[drm] failed to load kernel module \"%s\"\n", name);
-		return -1;
-	    }
-	}
-    }
 
     /*
      * Open the first minor number that matches the driver name and isn't