From: Benjamin Gaignard Date: Wed, 26 Jun 2013 15:58:59 +0000 (+0200) Subject: drm: drm_stub: Fixing return value if driver master_set call failed X-Git-Tag: firefly_0821_release~176^2~5752^2~76 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=53ef1600bdabfc4ba4ce0cc5f3b4a7cec55d1e98;p=firefly-linux-kernel-4.4.55.git 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 Signed-off-by: Dave Airlie --- 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,