mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-25 11:04:51 +03:00
gpu: nvgpu: compile out unused code in gr init unit
Add CONFIG_NVGPU_GRAPHICS check before calling g->gops>gr.init.preemption_state function. Add NULL checking of pointer before deferecing those pointers in de_init functions Jira NVGPU-4676 Change-Id: Id9be0aebdcab4a8fb2b03e92e67c1c207b5b8eab Signed-off-by: vinodg <vinodg@nvidia.com> Reviewed-on: http://git-master.nvidia.com/r/c/linux-nvgpu/+/2276898 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
@@ -610,6 +610,10 @@ void nvgpu_netlist_deinit_ctx_vars(struct gk20a *g)
|
||||
{
|
||||
struct nvgpu_netlist_vars *netlist_vars = g->netlist_vars;
|
||||
|
||||
if (netlist_vars == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
g->netlist_valid = false;
|
||||
nvgpu_kfree(g, netlist_vars->ucode.fecs.inst.l);
|
||||
nvgpu_kfree(g, netlist_vars->ucode.fecs.data.l);
|
||||
|
||||
Reference in New Issue
Block a user