diff --git a/drivers/gpu/nvgpu/os/linux/platform_gp10b_tegra.c b/drivers/gpu/nvgpu/os/linux/platform_gp10b_tegra.c index 00fd386e5..cf18fd24d 100644 --- a/drivers/gpu/nvgpu/os/linux/platform_gp10b_tegra.c +++ b/drivers/gpu/nvgpu/os/linux/platform_gp10b_tegra.c @@ -133,7 +133,7 @@ static void gp10b_tegra_scale_exit(struct device *dev) struct gk20a_platform *platform = gk20a_get_platform(dev); struct gk20a_scale_profile *profile = platform->g->scale_profile; - if (profile) + if (profile && profile->private_data) tegra_bwmgr_unregister( (struct tegra_bwmgr_client *)profile->private_data); } @@ -300,7 +300,8 @@ void gp10b_tegra_postscale(struct device *pdev, unsigned long emc_rate; nvgpu_log_fn(g, " "); - if (profile && !platform->is_railgated(pdev)) { + if (profile && profile->private_data && + !platform->is_railgated(pdev)) { unsigned long emc_scale; if (freq <= gp10b_freq_table[0])