[Openchrome-devel] xf86-video-openchrome: src/via_driver.c

James Simmons jsimmons at kemper.freedesktop.org
Mon Dec 3 10:56:40 PST 2012


 src/via_driver.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit fe5ef9748fe46c92db7a7ff91839b9dd582f6cea
Author: James Simmons <jsimmons at infradead.org>
Date:   Mon Dec 3 18:56:30 2012 +0000

    Doh, shouldn't code when sleepy. Free the TV i2c struct only we still have a pBIOSInfo struct left

diff --git a/src/via_driver.c b/src/via_driver.c
index 898b649..c499a4a 100644
--- a/src/via_driver.c
+++ b/src/via_driver.c
@@ -418,10 +418,10 @@ VIAFreeRec(ScrnInfoPtr pScrn)
 
     VIABIOSInfoPtr pBIOSInfo = pVia->pBIOSInfo;
 
-    if (pBIOSInfo->TVI2CDev)
-        xf86DestroyI2CDevRec(pBIOSInfo->TVI2CDev, TRUE);
-
     if (pBIOSInfo) {
+        if (pBIOSInfo->TVI2CDev)
+            xf86DestroyI2CDevRec(pBIOSInfo->TVI2CDev, TRUE);
+
         pVia->pBIOSInfo = NULL;
         free(pBIOSInfo);
     }


More information about the Openchrome-devel mailing list