Mesa (master): radeon: Fix compile warnings, compile errors.

Corbin Simpson csimpson at kemper.freedesktop.org
Sat Apr 4 08:03:13 UTC 2009


Module: Mesa
Branch: master
Commit: d6fd672bf9a9b7b24147341338055da3b9f81f89
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d6fd672bf9a9b7b24147341338055da3b9f81f89

Author: Corbin Simpson <MostAwesomeDude at gmail.com>
Date:   Sat Apr  4 00:33:23 2009 -0700

radeon: Fix compile warnings, compile errors.

---

 src/gallium/winsys/drm/radeon/core/radeon_r300.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/src/gallium/winsys/drm/radeon/core/radeon_r300.c b/src/gallium/winsys/drm/radeon/core/radeon_r300.c
index c7b6813..ce03bf2 100644
--- a/src/gallium/winsys/drm/radeon/core/radeon_r300.c
+++ b/src/gallium/winsys/drm/radeon/core/radeon_r300.c
@@ -79,10 +79,15 @@ struct r300_winsys*
 radeon_create_r300_winsys(int fd, struct radeon_winsys* old_winsys)
 {
     struct r300_winsys* winsys = CALLOC_STRUCT(r300_winsys);
+    struct radeon_cs_manager* csm;
+
+    if (winsys == NULL) {
+        return NULL;
+    }
 
     do_ioctls(winsys, fd);
 
-    struct radeon_cs_manager* csm = radeon_cs_manager_gem_ctor(fd);
+    csm = radeon_cs_manager_gem_ctor(fd);
 
     winsys->cs = radeon_cs_create(csm, 1024 * 64 / 4);
 




More information about the mesa-commit mailing list