summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/vgpu/vgpu.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/vgpu/vgpu.c')
-rw-r--r--drivers/gpu/nvgpu/vgpu/vgpu.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/vgpu/vgpu.c b/drivers/gpu/nvgpu/vgpu/vgpu.c
index bd332583..213f6bbb 100644
--- a/drivers/gpu/nvgpu/vgpu/vgpu.c
+++ b/drivers/gpu/nvgpu/vgpu/vgpu.c
@@ -191,6 +191,9 @@ static void vgpu_remove_support(struct device *dev)
191 struct tegra_vgpu_intr_msg msg; 191 struct tegra_vgpu_intr_msg msg;
192 int err; 192 int err;
193 193
194 if (g->dbg_regops_tmp_buf)
195 kfree(g->dbg_regops_tmp_buf);
196
194 if (g->pmu.remove_support) 197 if (g->pmu.remove_support)
195 g->pmu.remove_support(&g->pmu); 198 g->pmu.remove_support(&g->pmu);
196 199
@@ -242,6 +245,14 @@ static int vgpu_init_support(struct platform_device *pdev)
242 mutex_init(&g->client_lock); 245 mutex_init(&g->client_lock);
243 mutex_init(&g->ch_wdt_lock); 246 mutex_init(&g->ch_wdt_lock);
244 247
248 g->dbg_regops_tmp_buf = kzalloc(SZ_4K, GFP_KERNEL);
249 if (!g->dbg_regops_tmp_buf) {
250 dev_err(g->dev, "couldn't allocate regops tmp buf");
251 return -ENOMEM;
252 }
253 g->dbg_regops_tmp_buf_ops =
254 SZ_4K / sizeof(g->dbg_regops_tmp_buf[0]);
255
245 g->remove_support = vgpu_remove_support; 256 g->remove_support = vgpu_remove_support;
246 return 0; 257 return 0;
247 258