From: Christian König Date: Thu, 19 Sep 2019 13:16:49 +0000 (+0200) Subject: drm/amdgpu: restrict hotplug error message X-Git-Tag: v5.5-rc1~128^2~26^2~83 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=56f074d815cd65ebc9ffd3810acd60ea7155399d;p=thirdparty%2Flinux.git drm/amdgpu: restrict hotplug error message We should print the error only when we are hotplugged and crash basically all userspace applications. Signed-off-by: Christian König Reviewed-by: Emily Deng Acked-by: Alex Deucher Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c index 68192e455793a..9f2f54e5e06dd 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c @@ -1066,7 +1066,10 @@ amdgpu_pci_remove(struct pci_dev *pdev) { struct drm_device *dev = pci_get_drvdata(pdev); - DRM_ERROR("Device removal is currently not supported outside of fbcon\n"); +#ifdef MODULE + if (THIS_MODULE->state != MODULE_STATE_GOING) +#endif + DRM_ERROR("Hotplug removal is not supported\n"); drm_dev_unplug(dev); drm_dev_put(dev); pci_disable_device(pdev);