diff options
author | Nitin Kumbhar <nkumbhar@nvidia.com> | 2018-07-04 13:22:33 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-07-06 10:35:47 -0400 |
commit | 7c494c83cc7de9696cc931777a22d0d486b536c8 (patch) | |
tree | 0b156f2bf23014dccfb6e3d30001ae463ff74ad9 /drivers/gpu/nvgpu/gk20a | |
parent | 26b50d77f746e4e9a1556be7e679e45fc0aab8b9 (diff) |
gpu: nvgpu: add error check for init_runlist
Allocations in init_runlist can fail. Check for such
a failure during fifo setup is being done.
Bug 1987855
Change-Id: I1771a15ebeac81ab2e3ebc9a75363445a0b6f20d
Signed-off-by: Nitin Kumbhar <nkumbhar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1770801
Reviewed-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c index 00119300..cd54baf1 100644 --- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | |||
@@ -912,7 +912,11 @@ int gk20a_init_fifo_setup_sw_common(struct gk20a *g) | |||
912 | 912 | ||
913 | g->ops.fifo.init_engine_info(f); | 913 | g->ops.fifo.init_engine_info(f); |
914 | 914 | ||
915 | init_runlist(g, f); | 915 | err = init_runlist(g, f); |
916 | if (err) { | ||
917 | nvgpu_err(g, "failed to init runlist"); | ||
918 | goto clean_up; | ||
919 | } | ||
916 | 920 | ||
917 | nvgpu_init_list_node(&f->free_chs); | 921 | nvgpu_init_list_node(&f->free_chs); |
918 | 922 | ||