summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorBenjamin Gaignard <benjamin.gaignard@linaro.org>2013-06-26 17:58:59 +0200
committerDave Airlie <airlied@redhat.com>2013-06-27 21:03:16 +1000
commit53ef1600bdabfc4ba4ce0cc5f3b4a7cec55d1e98 (patch)
tree1b472149273b9620b54b6388928be8491f390ffa /drivers
parentdc0216445cdc5b937b78a02f1145a2fbcf92e9d6 (diff)
downloadlinux-53ef1600bdabfc4ba4ce0cc5f3b4a7cec55d1e98.tar.gz
linux-53ef1600bdabfc4ba4ce0cc5f3b4a7cec55d1e98.tar.bz2
linux-53ef1600bdabfc4ba4ce0cc5f3b4a7cec55d1e98.zip
drm: drm_stub: Fixing return value if driver master_set call failed
When dev->driver->master_set() failed ioctl call return 0 but the caller is not the DRM-Master because file_priv->is_master = 0. Fix that by returning to ioctl caller the driver master_set error code. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/drm_stub.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/drm_stub.c b/drivers/gpu/drm/drm_stub.c
index 577786ce9fbc..327ca19cda85 100644
--- a/drivers/gpu/drm/drm_stub.c
+++ b/drivers/gpu/drm/drm_stub.c
@@ -203,7 +203,7 @@ EXPORT_SYMBOL(drm_master_put);
int drm_setmaster_ioctl(struct drm_device *dev, void *data,
struct drm_file *file_priv)
{
- int ret;
+ int ret = 0;
if (file_priv->is_master)
return 0;
@@ -229,7 +229,7 @@ int drm_setmaster_ioctl(struct drm_device *dev, void *data,
}
mutex_unlock(&dev->struct_mutex);
- return 0;
+ return ret;
}
int drm_dropmaster_ioctl(struct drm_device *dev, void *data,