aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/pipebuffer
diff options
context:
space:
mode:
authorEdward O'Callaghan <[email protected]>2015-12-04 20:08:09 +1100
committerMarek Olšák <[email protected]>2015-12-06 17:10:23 +0100
commitd108b69d2cd4c54cc5eaa9ef5d75604d57b5187f (patch)
tree0d9f2e38772a896f7868015776ed8b5a5e1207d5 /src/gallium/auxiliary/pipebuffer
parent13eb5f596bc8ece3d1805b388aa53917e6158d7b (diff)
gallium: Remove redundant NULL ptr checks
Signed-off-by: Edward O'Callaghan <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/pipebuffer')
-rw-r--r--src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c
index 8e9bd960d2d..3d3a7aba7fb 100644
--- a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c
+++ b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c
@@ -259,12 +259,10 @@ pb_debug_buffer_map(struct pb_buffer *_buf,
if (!map)
return NULL;
- if (map) {
- pipe_mutex_lock(buf->mutex);
- ++buf->map_count;
- debug_backtrace_capture(buf->map_backtrace, 1, PB_DEBUG_MAP_BACKTRACE);
- pipe_mutex_unlock(buf->mutex);
- }
+ pipe_mutex_lock(buf->mutex);
+ ++buf->map_count;
+ debug_backtrace_capture(buf->map_backtrace, 1, PB_DEBUG_MAP_BACKTRACE);
+ pipe_mutex_unlock(buf->mutex);
return (uint8_t *)map + buf->underflow_size;
}