Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 345301
b: refs/heads/master
c: 08bec5b
h: refs/heads/master
i:
  345299: c7e9e07
v: v3
  • Loading branch information
David Herrmann authored and Dave Airlie committed Nov 20, 2012
1 parent 9b1697c commit d909102
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9fabd4eedeb904173d05cb1ced3c3e6b9d2e8137
refs/heads/master: 08bec5b4edd13a7cb0bc2fb27c529d794ae67054
24 changes: 12 additions & 12 deletions trunk/drivers/gpu/drm/drm_stub.c
Original file line number Diff line number Diff line change
Expand Up @@ -221,20 +221,20 @@ int drm_setmaster_ioctl(struct drm_device *dev, void *data,
if (!file_priv->master)
return -EINVAL;

if (!file_priv->minor->master &&
file_priv->minor->master != file_priv->master) {
mutex_lock(&dev->struct_mutex);
file_priv->minor->master = drm_master_get(file_priv->master);
file_priv->is_master = 1;
if (dev->driver->master_set) {
ret = dev->driver->master_set(dev, file_priv, false);
if (unlikely(ret != 0)) {
file_priv->is_master = 0;
drm_master_put(&file_priv->minor->master);
}
if (file_priv->minor->master)
return -EINVAL;

mutex_lock(&dev->struct_mutex);
file_priv->minor->master = drm_master_get(file_priv->master);
file_priv->is_master = 1;
if (dev->driver->master_set) {
ret = dev->driver->master_set(dev, file_priv, false);
if (unlikely(ret != 0)) {
file_priv->is_master = 0;
drm_master_put(&file_priv->minor->master);
}
mutex_unlock(&dev->struct_mutex);
}
mutex_unlock(&dev->struct_mutex);

return 0;
}
Expand Down

0 comments on commit d909102

Please sign in to comment.