aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmil Velikov <[email protected]>2020-03-19 17:29:30 +0000
committerEmil Velikov <[email protected]>2020-03-30 11:20:41 +0000
commit2bf99b22beff545d360fb0cc3a977add147713b6 (patch)
tree71f0ea88bbd0cf52e16caea5aa29b93e92e735dc
parentdrm: rework SET_MASTER and DROP_MASTER perm handling (diff)
downloadkernel-2bf99b22beff545d360fb0cc3a977add147713b6.tar.gz
kernel-2bf99b22beff545d360fb0cc3a977add147713b6.zip
drm: error out with EBUSY when device has existing master
As requested by Adam, provide different error message for when the device has an existing master. An audit of the following projects, shows that the errno is used only for printf() purposes. xorg/xserver xorg/drivers/xf86-video-ati xorg/drivers/xf86-video-amdgpu xorg/drivers/xf86-video-intel xorg/drivers/xf86-video-tegra xorg/drivers/xf86-video-freedreno xorg/drivers/xf86-video-nouveau xorg/drivers/xf86-video-vmwgfx qt/kwin/plasma gtk/mutter/gnomeshell efl/enlightment Cc: Adam Jackson <[email protected]> Suggested-by: Adam Jackson <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Adam Jackson <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
-rw-r--r--drivers/gpu/drm/drm_auth.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_auth.c b/drivers/gpu/drm/drm_auth.c
index 93c57f08bd93..800ac39f3213 100644
--- a/drivers/gpu/drm/drm_auth.c
+++ b/drivers/gpu/drm/drm_auth.c
@@ -245,7 +245,7 @@ int drm_setmaster_ioctl(struct drm_device *dev, void *data,
goto out_unlock;
if (dev->master) {
- ret = -EINVAL;
+ ret = -EBUSY;
goto out_unlock;
}