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
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue