summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
diff options
context:
space:
mode:
authorLuben Tuikov <luben.tuikov@amd.com>2020-09-02 02:10:32 +0300
committerAlex Deucher <alexander.deucher@amd.com>2020-09-03 21:47:55 +0300
commit1625951a3a7bdd776d38f2cdd35f72a795e82df0 (patch)
tree0a993577edb60dff80fb1548aa02bf947b4923ef /drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
parentabb6fccbb4e5bab30ff9b96e27acdd9107426f28 (diff)
downloadlinux-1625951a3a7bdd776d38f2cdd35f72a795e82df0.tar.xz
drm/amdgpu: Remove superfluous NULL check
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>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_device.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_device.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index c4900471beb0..6dcc256b9ebc 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -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)