diff options
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/nvgpu/os/linux/module.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/os/linux/module.c b/drivers/gpu/nvgpu/os/linux/module.c index 28ade90f..a59ac1f1 100644 --- a/drivers/gpu/nvgpu/os/linux/module.c +++ b/drivers/gpu/nvgpu/os/linux/module.c | |||
@@ -936,6 +936,9 @@ static int gk20a_pm_runtime_suspend(struct device *dev) | |||
936 | int err = 0; | 936 | int err = 0; |
937 | struct gk20a *g = get_gk20a(dev); | 937 | struct gk20a *g = get_gk20a(dev); |
938 | 938 | ||
939 | if (!g) | ||
940 | return 0; | ||
941 | |||
939 | if (gk20a_gpu_is_virtual(dev)) | 942 | if (gk20a_gpu_is_virtual(dev)) |
940 | err = vgpu_pm_prepare_poweroff(dev); | 943 | err = vgpu_pm_prepare_poweroff(dev); |
941 | else | 944 | else |