drm/amdgpu: cancel reset work on fini
authorAlex Deucher <alexander.deucher@amd.com>
Fri, 21 Oct 2016 20:16:07 +0000 (16:16 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 24 Oct 2016 20:59:55 +0000 (16:59 -0400)
Cancel any pending reset work when we tear down the driver.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c

index 278708f5a744eebb69f0d719bfcb198efcf2ec11..9fa809876339dd47e7cb225af2d8695f7c12b593 100644 (file)
@@ -239,6 +239,7 @@ int amdgpu_irq_init(struct amdgpu_device *adev)
        if (r) {
                adev->irq.installed = false;
                flush_work(&adev->hotplug_work);
+               cancel_work_sync(&adev->reset_work);
                return r;
        }
 
@@ -264,6 +265,7 @@ void amdgpu_irq_fini(struct amdgpu_device *adev)
                if (adev->irq.msi_enabled)
                        pci_disable_msi(adev->pdev);
                flush_work(&adev->hotplug_work);
+               cancel_work_sync(&adev->reset_work);
        }
 
        for (i = 0; i < AMDGPU_MAX_IRQ_SRC_ID; ++i) {