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 <djkurtz@chromium.org>
Signed-off-by: Thierry Reding <treding@nvidia.com>
main
Daniel Kurtz 2014-04-17 12:08:01 +08:00 committed by Thierry Reding
parent ee87b4716d
commit 305478ce02
1 changed files with 0 additions and 13 deletions

View File

@ -541,19 +541,6 @@ static int drmOpenByName(const char *name)
int fd; int fd;
drmVersionPtr version; drmVersionPtr version;
char * id; 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 * Open the first minor number that matches the driver name and isn't