From f4cd396150be285aa614f4272a51cd3dacf99096 Mon Sep 17 00:00:00 2001 From: Wenkai Lin Date: Mon, 10 Jan 2022 20:01:41 +0800 Subject: [PATCH 40/53] uadk: modify for free and return After free local variable, no need to set NULL. If return value is not associated with other functions, no need to set value, return directly. Signed-off-by: JunchongPan --- wd_util.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/wd_util.c b/wd_util.c index ad108bf..c2c109c 100644 --- a/wd_util.c +++ b/wd_util.c @@ -599,7 +599,6 @@ free_mem: } free(ctx_table); - ctx_table = NULL; return ret; } @@ -652,8 +651,7 @@ static int wd_parse_section(struct wd_env_config *config, char *section) config_numa = wd_get_config_numa(config, node); if (!config_numa) { WD_ERR("%s got wrong numa node: %s!\n", __func__, section); - ret = -WD_EINVAL; - return ret; + return -WD_EINVAL; } config_numa->op_type_num = config->op_type_num; -- 2.25.1