drm/amdgpu: Remove superfluous NULL check
authorLuben Tuikov <luben.tuikov@amd.com>
Tue, 1 Sep 2020 23:10:32 +0000 (19:10 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 3 Sep 2020 18:47:55 +0000 (14:47 -0400)
The DRM device is a static member of
the amdgpu device structure and as such
always exists, so long as the PCI and
thus the amdgpu device exist.

Signed-off-by: Luben Tuikov <luben.tuikov@amd.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

index c4900471beb00ce9c927f0d54e6dc52e4eed7cbf..6dcc256b9ebcef8fbb017e5a1d42abedd50b366b 100644 (file)
@@ -3471,9 +3471,6 @@ int amdgpu_device_suspend(struct drm_device *dev, bool fbcon)
        struct drm_connector_list_iter iter;
        int r;
 
-       if (!dev)
-               return -ENODEV;
-
        adev = drm_to_adev(dev);
 
        if (dev->switch_power_state == DRM_SWITCH_POWER_OFF)