diff options
author | Daniel Kurtz | 2014-04-16 23:08:01 -0500 |
---|---|---|
committer | Thierry Reding | 2014-05-13 05:14:19 -0500 |
commit | 305478ce02ebd908a75c9830ecea15f6e2469b42 (patch) | |
tree | 9813f8a116f59770e080e31ccfa106e5e64ac524 /xf86drm.c | |
parent | ee87b4716d416be94071eea5dd67a22d1e78df31 (diff) | |
download | external-libgbm-305478ce02ebd908a75c9830ecea15f6e2469b42.tar.gz external-libgbm-305478ce02ebd908a75c9830ecea15f6e2469b42.tar.xz external-libgbm-305478ce02ebd908a75c9830ecea15f6e2469b42.zip |
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>
Diffstat (limited to 'xf86drm.c')
-rw-r--r-- | xf86drm.c | 13 |
1 files changed, 0 insertions, 13 deletions
@@ -541,19 +541,6 @@ static int drmOpenByName(const char *name) | |||
541 | int fd; | 541 | int fd; |
542 | drmVersionPtr version; | 542 | drmVersionPtr version; |
543 | char * id; | 543 | char * id; |
544 | |||
545 | if (!drmAvailable()) { | ||
546 | if (!drm_server_info) { | ||
547 | return -1; | ||
548 | } | ||
549 | else { | ||
550 | /* try to load the kernel module now */ | ||
551 | if (!drm_server_info->load_module(name)) { | ||
552 | drmMsg("[drm] failed to load kernel module \"%s\"\n", name); | ||
553 | return -1; | ||
554 | } | ||
555 | } | ||
556 | } | ||
557 | 544 | ||
558 | /* | 545 | /* |
559 | * Open the first minor number that matches the driver name and isn't | 546 | * Open the first minor number that matches the driver name and isn't |