diff options
author | Eric Engestrom | 2017-07-30 15:27:38 -0500 |
---|---|---|
committer | Eric Engestrom | 2017-08-07 08:16:41 -0500 |
commit | ac2b806c4556c8339f5eb95578884278b1925acb (patch) | |
tree | f65376b03ff1dc1f499cec5341a5cdf907df2bb0 /freedreno | |
parent | e2b6785c5abecceee8f3c1830ee1bb22e6d0ef51 (diff) | |
download | external-libdrm-ac2b806c4556c8339f5eb95578884278b1925acb.tar.gz external-libdrm-ac2b806c4556c8339f5eb95578884278b1925acb.tar.xz external-libdrm-ac2b806c4556c8339f5eb95578884278b1925acb.zip |
freedreno: remove dead error path
`pipe` cannot be non-null, so the label reduces to a simple return.
Then, there is no point initialising `pipe` 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/freedreno_pipe.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/freedreno/freedreno_pipe.c b/freedreno/freedreno_pipe.c index 3f8c8342..e69cb28c 100644 --- a/freedreno/freedreno_pipe.c +++ b/freedreno/freedreno_pipe.c | |||
@@ -36,18 +36,18 @@ | |||
36 | struct fd_pipe * | 36 | struct fd_pipe * |
37 | fd_pipe_new(struct fd_device *dev, enum fd_pipe_id id) | 37 | fd_pipe_new(struct fd_device *dev, enum fd_pipe_id id) |
38 | { | 38 | { |
39 | struct fd_pipe *pipe = NULL; | 39 | struct fd_pipe *pipe; |
40 | uint64_t val; | 40 | uint64_t val; |
41 | 41 | ||
42 | if (id > FD_PIPE_MAX) { | 42 | if (id > FD_PIPE_MAX) { |
43 | ERROR_MSG("invalid pipe id: %d", id); | 43 | ERROR_MSG("invalid pipe id: %d", id); |
44 | goto fail; | 44 | return NULL; |
45 | } | 45 | } |
46 | 46 | ||
47 | pipe = dev->funcs->pipe_new(dev, id); | 47 | pipe = dev->funcs->pipe_new(dev, id); |
48 | if (!pipe) { | 48 | if (!pipe) { |
49 | ERROR_MSG("allocation failed"); | 49 | ERROR_MSG("allocation failed"); |
50 | goto fail; | 50 | return NULL; |
51 | } | 51 | } |
52 | 52 | ||
53 | pipe->dev = dev; | 53 | pipe->dev = dev; |
@@ -57,10 +57,6 @@ fd_pipe_new(struct fd_device *dev, enum fd_pipe_id id) | |||
57 | pipe->gpu_id = val; | 57 | pipe->gpu_id = val; |
58 | 58 | ||
59 | return pipe; | 59 | return pipe; |
60 | fail: | ||
61 | if (pipe) | ||
62 | fd_pipe_del(pipe); | ||
63 | return NULL; | ||
64 | } | 60 | } |
65 | 61 | ||
66 | void fd_pipe_del(struct fd_pipe *pipe) | 62 | void fd_pipe_del(struct fd_pipe *pipe) |