[PATCH] fix typo for drmOpenByName

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Guo Yejun <yejun.guo@xxxxxxxxx>
---
 xf86drm.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/xf86drm.c b/xf86drm.c
index f7c45f8..5e7306e 100644
--- a/xf86drm.c
+++ b/xf86drm.c
@@ -635,9 +635,8 @@ static int drmOpenByName(const char *name, int type)
 		    drmFreeVersion(version);
 		    id = drmGetBusid(fd);
 		    drmMsg("drmGetBusid returned '%s'\n", id ? id : "NULL");
-		    if (!id || !*id) {
-			if (id)
-			    drmFreeBusid(id);
+		    if (id && *id) {
+			drmFreeBusid(id);
 			return fd;
 		    } else {
 			drmFreeBusid(id);
-- 
1.9.1

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel





[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux