diff options
Diffstat (limited to 'src/gallium/drivers/i915')
-rw-r--r-- | src/gallium/drivers/i915/i915_context.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/i915/i915_resource_buffer.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/i915/i915_resource_texture.c | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/gallium/drivers/i915/i915_context.c b/src/gallium/drivers/i915/i915_context.c index 05f8e93ddea..82798bbb543 100644 --- a/src/gallium/drivers/i915/i915_context.c +++ b/src/gallium/drivers/i915/i915_context.c @@ -160,7 +160,7 @@ i915_create_context(struct pipe_screen *screen, void *priv, unsigned flags) struct i915_context *i915; i915 = CALLOC_STRUCT(i915_context); - if (i915 == NULL) + if (!i915) return NULL; i915->iws = i915_screen(screen)->iws; diff --git a/src/gallium/drivers/i915/i915_resource_buffer.c b/src/gallium/drivers/i915/i915_resource_buffer.c index 9fb3855a37e..fb2e53b014f 100644 --- a/src/gallium/drivers/i915/i915_resource_buffer.c +++ b/src/gallium/drivers/i915/i915_resource_buffer.c @@ -72,7 +72,7 @@ i915_buffer_transfer_map(struct pipe_context *pipe, struct i915_buffer *buffer = i915_buffer(resource); struct pipe_transfer *transfer = util_slab_alloc(&i915->transfer_pool); - if (transfer == NULL) + if (!transfer) return NULL; transfer->resource = resource; diff --git a/src/gallium/drivers/i915/i915_resource_texture.c b/src/gallium/drivers/i915/i915_resource_texture.c index 9a3279ccb75..03cdcf1c990 100644 --- a/src/gallium/drivers/i915/i915_resource_texture.c +++ b/src/gallium/drivers/i915/i915_resource_texture.c @@ -728,7 +728,7 @@ i915_texture_transfer_map(struct pipe_context *pipe, unsigned offset; char *map; - if (transfer == NULL) + if (!transfer) return NULL; transfer->b.resource = resource; @@ -774,7 +774,7 @@ i915_texture_transfer_map(struct pipe_context *pipe, map = iws->buffer_map(iws, tex->buffer, (transfer->b.usage & PIPE_TRANSFER_WRITE) ? TRUE : FALSE); - if (map == NULL) { + if (!map) { pipe_resource_reference(&transfer->staging_texture, NULL); FREE(transfer); return NULL; |