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>
This commit is contained in:
parent
dc0216445c
commit
53ef1600bd
|
@ -203,7 +203,7 @@ EXPORT_SYMBOL(drm_master_put);
|
||||||
int drm_setmaster_ioctl(struct drm_device *dev, void *data,
|
int drm_setmaster_ioctl(struct drm_device *dev, void *data,
|
||||||
struct drm_file *file_priv)
|
struct drm_file *file_priv)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret = 0;
|
||||||
|
|
||||||
if (file_priv->is_master)
|
if (file_priv->is_master)
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -229,7 +229,7 @@ int drm_setmaster_ioctl(struct drm_device *dev, void *data,
|
||||||
}
|
}
|
||||||
mutex_unlock(&dev->struct_mutex);
|
mutex_unlock(&dev->struct_mutex);
|
||||||
|
|
||||||
return 0;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int drm_dropmaster_ioctl(struct drm_device *dev, void *data,
|
int drm_dropmaster_ioctl(struct drm_device *dev, void *data,
|
||||||
|
|
Loading…
Reference in a new issue