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
parent
ee87b4716d
commit
305478ce02
13
xf86drm.c
13
xf86drm.c
|
@ -542,19 +542,6 @@ static int drmOpenByName(const char *name)
|
|||
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
|
||||
* already in use. If it's in use it will have a busid assigned already.
|
||||
|
|
Loading…
Reference in New Issue