From: Christian König Date: Thu, 19 Sep 2019 13:16:49 +0000 (+0200) Subject: drm/amdgpu: restrict hotplug error message X-Git-Tag: for-linus-20191205~71^2~27^2~83 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=56f074d815cd65ebc9ffd3810acd60ea7155399d;p=linux-block.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 68192e455793..9f2f54e5e06d 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);