mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 18:16:01 +03:00
gpu: nvgpu: vgpu: fix error handling for mempool reserve failure
Bug 1648908 Bug 200183294 Change-Id: Iccf5eb762a544e423050d223bfcb6f8a53af6350 Signed-off-by: Richard Zhao <rizhao@nvidia.com> Reviewed-on: http://git-master/r/1113040 Reviewed-on: http://git-master/r/1121262 Reviewed-by: Aingara Paramakuru <aparamakuru@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
This commit is contained in:
committed by
Terje Bergstrom
parent
60b715e856
commit
c8c376b22a
@@ -62,6 +62,11 @@ static int vgpu_fecs_trace_init(struct gk20a *g)
|
||||
}
|
||||
|
||||
vcst->buf = ioremap_cache(vcst->cookie->ipa, vcst->cookie->size);
|
||||
if (!vcst->buf) {
|
||||
dev_info(dev_from_gk20a(g), "ioremap_cache failed\n");
|
||||
err = -EINVAL;
|
||||
goto fail;
|
||||
}
|
||||
vcst->header = vcst->buf;
|
||||
vcst->num_entries = vcst->header->num_ents;
|
||||
if (unlikely(vcst->header->ent_size != sizeof(*vcst->entries))) {
|
||||
@@ -75,7 +80,7 @@ static int vgpu_fecs_trace_init(struct gk20a *g)
|
||||
return 0;
|
||||
fail:
|
||||
iounmap(vcst->buf);
|
||||
if (vcst->cookie)
|
||||
if (!IS_ERR(vcst->cookie))
|
||||
tegra_hv_mempool_unreserve(vcst->cookie);
|
||||
kfree(vcst);
|
||||
return err;
|
||||
|
||||
Reference in New Issue
Block a user