From ac028b20e5431ed3c78b6a4a9192e84f6873c9fd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Sun, 11 Sep 2011 18:01:25 +0200 Subject: [PATCH] r600g: set the return type of radeon_destroy to void --- src/gallium/drivers/r600/r600.h | 2 +- src/gallium/winsys/r600/drm/r600_drm.c | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/gallium/drivers/r600/r600.h b/src/gallium/drivers/r600/r600.h index 86ef4313320..d058cdd6328 100644 --- a/src/gallium/drivers/r600/r600.h +++ b/src/gallium/drivers/r600/r600.h @@ -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, diff --git a/src/gallium/winsys/r600/drm/r600_drm.c b/src/gallium/winsys/r600/drm/r600_drm.c index c9fb09787ae..d2cb9da64af 100644 --- a/src/gallium/winsys/r600/drm/r600_drm.c +++ b/src/gallium/winsys/r600/drm/r600_drm.c @@ -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; } -- 2.30.2