r600g: set the return type of radeon_destroy to void
authorMarek Olšák <maraeo@gmail.com>
Sun, 11 Sep 2011 16:01:25 +0000 (18:01 +0200)
committerMarek Olšák <maraeo@gmail.com>
Mon, 12 Sep 2011 20:03:03 +0000 (22:03 +0200)
src/gallium/drivers/r600/r600.h
src/gallium/winsys/r600/drm/r600_drm.c

index 86ef43133207a4b847e3bdfa6728d3ba84899b82..d058cdd6328ceac7eac8918b901168cf75ae9eaa 100644 (file)
@@ -303,7 +303,7 @@ void evergreen_context_pipe_state_set_ps_sampler(struct r600_context *ctx, struc
 void evergreen_context_pipe_state_set_vs_sampler(struct r600_context *ctx, struct r600_pipe_state *state, unsigned id);
 
 struct radeon *radeon_create(struct radeon_winsys *ws);
-struct radeon *radeon_destroy(struct radeon *radeon);
+void radeon_destroy(struct radeon *radeon);
 
 void _r600_pipe_state_add_reg(struct r600_context *ctx,
                              struct r600_pipe_state *state,
index c9fb09787aeae34db5a1169fef1bd99ffc623a3e..d2cb9da64af5277a11dfec368b7d0f766315e963 100644 (file)
@@ -64,7 +64,8 @@ struct radeon *radeon_create(struct radeon_winsys *ws)
        radeon->family = radeon_family_from_device(radeon->info.pci_id);
        if (radeon->family == CHIP_UNKNOWN) {
                fprintf(stderr, "Unknown chipset 0x%04X\n", radeon->info.pci_id);
-               return radeon_destroy(radeon);
+               radeon_destroy(radeon);
+               return NULL;
        }
 
        /* setup class */
@@ -81,11 +82,7 @@ struct radeon *radeon_create(struct radeon_winsys *ws)
        return radeon;
 }
 
-struct radeon *radeon_destroy(struct radeon *radeon)
+void radeon_destroy(struct radeon *radeon)
 {
-       if (radeon == NULL)
-               return NULL;
-
        FREE(radeon);
-       return NULL;
 }