mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
Disabling NVGPU_SUPPORT_MIG in suspend path leads to inconsistencies. During driver removal without the flag set, the driver still tries to free structures that might not have been allocated in the first place. e.g. nvgpu_gr_zbc_deinit, nvgpu_gr_zcull_deinit. Added NULL checks for ZBC and ZCULL structures before freeing them as a solution. Jira NVGPU-6832 Change-Id: I8a0c64ca982d11fee55542abd3c5bce5a51b4007 Signed-off-by: Debarshi Dutta <ddutta@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2535101 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com> Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com> Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com> Reviewed-by: Lakshmanan M <lm@nvidia.com> Reviewed-by: Dinesh T <dt@nvidia.com> Reviewed-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>