[PATCH] drm: remove redundant assignment to variable 'ret'

Jing Xiangfeng jingxiangfeng at huawei.com
Wed Jul 15 07:05:59 UTC 2020


The variable ret has been assigned the value '-EINVAL'. The assignment
in the if() is redundant. We can remove it.

Signed-off-by: Jing Xiangfeng <jingxiangfeng at huawei.com>
---
 drivers/gpu/drm/drm_auth.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_auth.c b/drivers/gpu/drm/drm_auth.c
index 800ac39f3213..6e1b502f2797 100644
--- a/drivers/gpu/drm/drm_auth.c
+++ b/drivers/gpu/drm/drm_auth.c
@@ -299,7 +299,6 @@ int drm_dropmaster_ioctl(struct drm_device *dev, void *data,
 
 	if (file_priv->master->lessor != NULL) {
 		DRM_DEBUG_LEASE("Attempt to drop lessee %d as master\n", file_priv->master->lessee_id);
-		ret = -EINVAL;
 		goto out_unlock;
 	}
 
-- 
2.17.1



More information about the dri-devel mailing list