mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-25 02:52:51 +03:00
gpu: nvgpu: vgpu: fix Oops when dt have no mempool-fecs-trace
Avoid unreserving mempool when it didn't reserve successfully. Bug 1757733 Change-Id: I39d36492a54c2e71afff3221505196a463c06776 Signed-off-by: Richard Zhao <rizhao@nvidia.com> Reviewed-on: http://git-master/r/1132057 (cherry picked from commit b18060ea30b924c4ef39c05a70d4f03759061128) Reviewed-on: http://git-master/r/1132129 GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
This commit is contained in:
committed by
Terje Bergstrom
parent
abec0ddc19
commit
5ccaaa73af
@@ -58,6 +58,7 @@ static int vgpu_fecs_trace_init(struct gk20a *g)
|
||||
if (IS_ERR(vcst->cookie)) {
|
||||
dev_info(dev_from_gk20a(g),
|
||||
"mempool %u reserve failed\n", mempool);
|
||||
vcst->cookie = NULL;
|
||||
err = -EINVAL;
|
||||
goto fail;
|
||||
}
|
||||
@@ -85,7 +86,7 @@ static int vgpu_fecs_trace_init(struct gk20a *g)
|
||||
return 0;
|
||||
fail:
|
||||
iounmap(vcst->buf);
|
||||
if (!IS_ERR(vcst->cookie))
|
||||
if (vcst->cookie)
|
||||
tegra_hv_mempool_unreserve(vcst->cookie);
|
||||
kfree(vcst);
|
||||
return err;
|
||||
|
||||
Reference in New Issue
Block a user