From: Luben Tuikov Date: Tue, 1 Sep 2020 23:10:32 +0000 (-0400) Subject: drm/amdgpu: Remove superfluous NULL check X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=1625951a3a7bdd776d38f2cdd35f72a795e82df0;p=linux.git 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 Acked-by: Daniel Vetter Acked-by: Christian König Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index c4900471beb00..6dcc256b9ebce 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)