Mesa (main): pan/bi: Simplify condition

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Aug 25 20:18:05 UTC 2021


Module: Mesa
Branch: main
Commit: b1aa15d5825e61e09ad4302b9a553185e4caad47
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=b1aa15d5825e61e09ad4302b9a553185e4caad47

Author: Alyssa Rosenzweig <alyssa at collabora.com>
Date:   Tue Aug 24 16:40:35 2021 -0400

pan/bi: Simplify condition

Flagged by cppcheck.

Signed-off-by: Alyssa Rosenzweig <alyssa at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12530>

---

 src/panfrost/bifrost/bi_ra.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/panfrost/bifrost/bi_ra.c b/src/panfrost/bifrost/bi_ra.c
index 97867ae395a..bc65c8e336d 100644
--- a/src/panfrost/bifrost/bi_ra.c
+++ b/src/panfrost/bifrost/bi_ra.c
@@ -507,7 +507,7 @@ bi_register_allocate(bi_context *ctx)
 
                 if (success) {
                         ctx->info->work_reg_count = 32;
-                } else if (!success) {
+                } else {
                         lcra_free(l);
                         l = NULL;
                 }



More information about the mesa-commit mailing list