aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Engestrom2017-07-30 15:27:39 -0500
committerEric Engestrom2017-08-07 08:16:41 -0500
commit6338e452c907a5e8024b2f3615795ac68dcf0a35 (patch)
tree7b4574340e4583ee1e8d2b8b9af5a3fb1bbbc969 /freedreno
parentac2b806c4556c8339f5eb95578884278b1925acb (diff)
downloadexternal-libgbm-6338e452c907a5e8024b2f3615795ac68dcf0a35.tar.gz
external-libgbm-6338e452c907a5e8024b2f3615795ac68dcf0a35.tar.xz
external-libgbm-6338e452c907a5e8024b2f3615795ac68dcf0a35.zip
freedreno/msm: remove dead error path
`ring` cannot be non-null, so the label reduces to a simple return. Then, there is no point initialising `ring` just to overwrite it before anyone reads it. Signed-off-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Rob Clark <robdclark@gmail.com>
Diffstat (limited to 'freedreno')
-rw-r--r--freedreno/msm/msm_ringbuffer.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/freedreno/msm/msm_ringbuffer.c b/freedreno/msm/msm_ringbuffer.c
index c3b2eded..5b28feaa 100644
--- a/freedreno/msm/msm_ringbuffer.c
+++ b/freedreno/msm/msm_ringbuffer.c
@@ -589,12 +589,12 @@ drm_private struct fd_ringbuffer * msm_ringbuffer_new(struct fd_pipe *pipe,
589 uint32_t size) 589 uint32_t size)
590{ 590{
591 struct msm_ringbuffer *msm_ring; 591 struct msm_ringbuffer *msm_ring;
592 struct fd_ringbuffer *ring = NULL; 592 struct fd_ringbuffer *ring;
593 593
594 msm_ring = calloc(1, sizeof(*msm_ring)); 594 msm_ring = calloc(1, sizeof(*msm_ring));
595 if (!msm_ring) { 595 if (!msm_ring) {
596 ERROR_MSG("allocation failed"); 596 ERROR_MSG("allocation failed");
597 goto fail; 597 return NULL;
598 } 598 }
599 599
600 if (size == 0) { 600 if (size == 0) {
@@ -614,8 +614,4 @@ drm_private struct fd_ringbuffer * msm_ringbuffer_new(struct fd_pipe *pipe,
614 ring_cmd_new(ring, size); 614 ring_cmd_new(ring, size);
615 615
616 return ring; 616 return ring;
617fail:
618 if (ring)
619 fd_ringbuffer_del(ring);
620 return NULL;
621} 617}