drm/amdgpu: Fix NULL ptr on driver unload due to init failure.
authorAndrey Grodzovsky <andrey.grodzovsky@amd.com>
Wed, 21 Mar 2018 18:17:25 +0000 (14:17 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 21 Mar 2018 20:04:42 +0000 (15:04 -0500)
Problem:
When unloading due to failure amdgpu_device_fini was called twice
which was leading to NULL ptr in amdgpu_irq_disable_all.

Fix:
Call amdgpu_device_fini only once from amdgpu_driver_unload_kms.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

index d7245c7949ac5cd9ffd899edaed15e12a34af872..34af664b9f93cd9a4ca87ef7d9da8b0aeb5c9dd8 100644 (file)
@@ -2353,7 +2353,6 @@ fence_driver_init:
                }
                dev_err(adev->dev, "amdgpu_device_ip_init failed\n");
                amdgpu_vf_error_put(adev, AMDGIM_ERROR_VF_AMDGPU_INIT_FAIL, 0, 0);
-               amdgpu_device_ip_fini(adev);
                goto failed;
        }