summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/linux/pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/pci.c')
-rw-r--r--drivers/gpu/nvgpu/common/linux/pci.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/pci.c b/drivers/gpu/nvgpu/common/linux/pci.c
index f1d12367..1a7d1842 100644
--- a/drivers/gpu/nvgpu/common/linux/pci.c
+++ b/drivers/gpu/nvgpu/common/linux/pci.c
@@ -521,13 +521,12 @@ static void nvgpu_pci_remove(struct pci_dev *pdev)
521 if (gk20a_gpu_is_virtual(dev)) 521 if (gk20a_gpu_is_virtual(dev))
522 return; 522 return;
523 523
524 /* only idle the GPU if the GPU is powered on */ 524 gk20a_driver_start_unload(g);
525 if (g->power_on) { 525 err = nvgpu_quiesce(g);
526 gk20a_driver_start_unload(g); 526 /* TODO: handle failure to idle */
527 err = nvgpu_quiesce(g); 527 WARN(err, "gpu failed to idle during driver removal");
528 /* TODO: handle failure to idle */ 528
529 WARN(err, "gpu failed to idle during driver removal"); 529 nvgpu_free_irq(g);
530 }
531 530
532 nvgpu_remove(dev, &nvgpu_pci_class); 531 nvgpu_remove(dev, &nvgpu_pci_class);
533 532