From 8db8b72951a4ea2be46fd4c5be1d792b75d783cb Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Fri, 19 Feb 2021 09:41:15 -0500 Subject: [PATCH] panfrost: Remove redundant NULL check Already checked in the callee, no need to check in the caller. Signed-off-by: Alyssa Rosenzweig Reviewed-by: Boris Brezillon Part-of: --- src/gallium/drivers/panfrost/pan_fragment.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/gallium/drivers/panfrost/pan_fragment.c b/src/gallium/drivers/panfrost/pan_fragment.c index 0a6a026..6efcd2b 100644 --- a/src/gallium/drivers/panfrost/pan_fragment.c +++ b/src/gallium/drivers/panfrost/pan_fragment.c @@ -62,12 +62,10 @@ panfrost_fragment_job(struct panfrost_batch *batch, bool has_draws) struct pipe_framebuffer_state *fb = &batch->key; - for (unsigned i = 0; i < fb->nr_cbufs; ++i) { + for (unsigned i = 0; i < fb->nr_cbufs; ++i) panfrost_initialize_surface(batch, fb->cbufs[i]); - } - if (fb->zsbuf) - panfrost_initialize_surface(batch, fb->zsbuf); + panfrost_initialize_surface(batch, fb->zsbuf); /* The passed tile coords can be out of range in some cases, so we need * to clamp them to the framebuffer size to avoid a TILE_RANGE_FAULT. -- 2.7.4