From 305478ce02ebd908a75c9830ecea15f6e2469b42 Mon Sep 17 00:00:00 2001 From: Daniel Kurtz Date: Thu, 17 Apr 2014 12:08:01 +0800 Subject: [PATCH] drmOpenByName: remove redundant drmAvailable check drmOpenByName() is a static function that is only called by drmOpen(). drmOpen() already checks drmAvailable(), so the check in drmOpenByName() is redundant. Signed-off-by: Daniel Kurtz Signed-off-by: Thierry Reding --- xf86drm.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/xf86drm.c b/xf86drm.c index e94f2cd..85beb8c 100644 --- a/xf86drm.c +++ b/xf86drm.c @@ -541,19 +541,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 -- 2.7.4