Commit dcb73180 authored by Nianyao Tang's avatar Nianyao Tang Committed by Greg Kroah-Hartman

irqchip/gic-v3-its: Free unused vpt_page when alloc vpe table fail

[ Upstream commit 34f8eb92 ]

In its_vpe_init, when its_alloc_vpe_table fails, we should free
vpt_page allocated just before, instead of vpe->vpt_page.
Let's fix it.

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: default avatarNianyao Tang <tangnianyao@huawei.com>
Signed-off-by: default avatarShaokun Zhang <zhangshaokun@hisilicon.com>
Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent e72e6ba1
...@@ -2883,7 +2883,7 @@ static int its_vpe_init(struct its_vpe *vpe) ...@@ -2883,7 +2883,7 @@ static int its_vpe_init(struct its_vpe *vpe)
if (!its_alloc_vpe_table(vpe_id)) { if (!its_alloc_vpe_table(vpe_id)) {
its_vpe_id_free(vpe_id); its_vpe_id_free(vpe_id);
its_free_pending_table(vpe->vpt_page); its_free_pending_table(vpt_page);
return -ENOMEM; return -ENOMEM;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment