Commit 6338e452 authored by Eric Engestrom's avatar Eric Engestrom 💤 Committed by Eric Engestrom
Browse files

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's avatarEric Engestrom <>
Reviewed-by: Rob Clark's avatarRob Clark <>
parent ac2b806c
......@@ -589,12 +589,12 @@ drm_private struct fd_ringbuffer * msm_ringbuffer_new(struct fd_pipe *pipe,
uint32_t size)
struct msm_ringbuffer *msm_ring;
struct fd_ringbuffer *ring = NULL;
struct fd_ringbuffer *ring;
msm_ring = calloc(1, sizeof(*msm_ring));
if (!msm_ring) {
ERROR_MSG("allocation failed");
goto fail;
return NULL;
if (size == 0) {
......@@ -614,8 +614,4 @@ drm_private struct fd_ringbuffer * msm_ringbuffer_new(struct fd_pipe *pipe,
ring_cmd_new(ring, size);
return ring;
if (ring)
return NULL;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment