diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/nvgpu/common/mm/vidmem.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/gpu/nvgpu/common/mm/vidmem.c b/drivers/gpu/nvgpu/common/mm/vidmem.c index b6e1919f..febf6830 100644 --- a/drivers/gpu/nvgpu/common/mm/vidmem.c +++ b/drivers/gpu/nvgpu/common/mm/vidmem.c | |||
@@ -39,13 +39,8 @@ | |||
39 | void nvgpu_vidmem_destroy(struct gk20a *g) | 39 | void nvgpu_vidmem_destroy(struct gk20a *g) |
40 | { | 40 | { |
41 | struct nvgpu_timeout timeout; | 41 | struct nvgpu_timeout timeout; |
42 | size_t size; | ||
43 | 42 | ||
44 | size = g->ops.mm.get_vidmem_size ? | 43 | if (!g->ops.mm.get_vidmem_size) |
45 | g->ops.mm.get_vidmem_size(g) : 0; | ||
46 | |||
47 | /* Nothing to destroy if no vidmem */ | ||
48 | if (!size) | ||
49 | return; | 44 | return; |
50 | 45 | ||
51 | nvgpu_timeout_init(g, &timeout, 100, NVGPU_TIMER_RETRY_TIMER); | 46 | nvgpu_timeout_init(g, &timeout, 100, NVGPU_TIMER_RETRY_TIMER); |