[PATCH OLK-6.6] mm/dpool: do not use uninitialized variable

hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I8S9BY -------------------------------- Variable ret is not initialized if dpool_create() failed during dpool_init(). Do not dump it to fix this problem. Fixes: cf98ffbc116b ("mm/dynamic_pool: fill dpool with pagelist") Signed-off-by: Wupeng Ma <mawupeng1@huawei.com> --- mm/dynamic_pool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/dynamic_pool.c b/mm/dynamic_pool.c index 063fb6092401..1b79fb099cc9 100644 --- a/mm/dynamic_pool.c +++ b/mm/dynamic_pool.c @@ -1701,7 +1701,7 @@ int dpool_init(struct dpool_info *arg) dpool = dpool_create(arg->memcg, &pagelist_dpool_ops); if (!dpool) { - pr_err("init failed, create failed. ret: %d\n", ret); + pr_err("init failed, create failed.\n"); ret = -ENOMEM; goto unlock; } -- 2.43.0

反馈: 您发送到kernel@openeuler.org的补丁/补丁集,已成功转换为PR! PR链接地址: https://gitee.com/openeuler/kernel/pulls/17319 邮件列表地址:https://mailweb.openeuler.org/archives/list/kernel@openeuler.org/message/ONB... FeedBack: The patch(es) which you have sent to kernel@openeuler.org mailing list has been converted to a pull request successfully! Pull request link: https://gitee.com/openeuler/kernel/pulls/17319 Mailing list address: https://mailweb.openeuler.org/archives/list/kernel@openeuler.org/message/ONB...
participants (2)
-
patchwork bot
-
Wupeng Ma