From c9724682b52ba453817c3430af1332f28f5ac50c Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Mon, 21 Nov 2016 21:19:50 -0800 Subject: [PATCH] i965: Simplify num_sources_from_inst(). desc will always be non-NULL, because brw_validate_instructions() does not attempt to validate any instructions that fail the is_unsupported_inst() check. Reviewed-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_eu_validate.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_eu_validate.c b/src/mesa/drivers/dri/i965/brw_eu_validate.c index 86f0ec89012..8c2eb99f8e5 100644 --- a/src/mesa/drivers/dri/i965/brw_eu_validate.c +++ b/src/mesa/drivers/dri/i965/brw_eu_validate.c @@ -103,10 +103,8 @@ num_sources_from_inst(const struct gen_device_info *devinfo, */ return 0; } - } else if (desc) { - return desc->nsrc; } else { - return 0; + return desc->nsrc; } switch (math_function) { -- 2.30.2