mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: return error for allocation failure
This patch modifies nvgpu_runlist_setup_sw() to return error code for allocation failures. This patch also modifies nvgpu_runlist_cleanup_sw() to check active_runlist_info pointer before freeing runlist->mem. Jira NVGPU-3699 Change-Id: Id6e72188ae5e921568c7ad016c115676358edf58 Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2197346 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
Alex Waterman
parent
424df3b827
commit
1155e394a1
@@ -642,7 +642,8 @@ void nvgpu_runlist_cleanup_sw(struct gk20a *g)
|
||||
u32 i, j;
|
||||
struct nvgpu_runlist_info *runlist;
|
||||
|
||||
if ((f == NULL) || (f->runlist_info == NULL)) {
|
||||
if ((f == NULL) || (f->runlist_info == NULL) ||
|
||||
(f->active_runlist_info == NULL)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user