Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 24b4452d authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "drm: Check for lessee in DROP_MASTER ioctl"

parents 0b5e81a5 d35f4c79
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -232,6 +232,12 @@ int drm_dropmaster_ioctl(struct drm_device *dev, void *data,
	if (!dev->master)
		goto out_unlock;

	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;
	}

	ret = 0;
	drm_drop_master(dev, file_priv);
out_unlock: