libwd/0037-uadk-modify-for-free-and-return.patch
Yang Shen aa2d7cce3f libwd: backport for uadk from 2.3.24 to 2.3.27
Update some patch for uadk from mainline.
To get more infomation, please visit the homepage:
https://github.com/Linaro/uadk

Signed-off-by: Yang Shen <shenyang39@huawei.com>
2022-02-21 06:32:14 +00:00

40 lines
1.0 KiB
Diff

From f4cd396150be285aa614f4272a51cd3dacf99096 Mon Sep 17 00:00:00 2001
From: Wenkai Lin <linwenkai6@hisilicon.com>
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 <panjunchong@hisilicon.com>
---
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