Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 84030
b: refs/heads/master
c: b018fcd
h: refs/heads/master
v: v3
  • Loading branch information
Eric Anholt authored and Dave Airlie committed Feb 7, 2008
1 parent cd441a2 commit 312ab58
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 15 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: 3260f9fdfee9d5b4135f40943dc0bd0733b7394e
refs/heads/master: b018fcdaa5e8b4eabb8cffda687d00004a3c4785
25 changes: 11 additions & 14 deletions trunk/drivers/char/drm/drm_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -235,25 +235,22 @@ int drm_getclient(struct drm_device *dev, void *data,
idx = client->idx;
mutex_lock(&dev->struct_mutex);

if (list_empty(&dev->filelist)) {
mutex_unlock(&dev->struct_mutex);
return -EINVAL;
}

i = 0;
list_for_each_entry(pt, &dev->filelist, lhead) {
if (i++ >= idx)
break;
if (i++ >= idx) {
client->auth = pt->authenticated;
client->pid = pt->pid;
client->uid = pt->uid;
client->magic = pt->magic;
client->iocs = pt->ioctl_count;
mutex_unlock(&dev->struct_mutex);

return 0;
}
}

client->auth = pt->authenticated;
client->pid = pt->pid;
client->uid = pt->uid;
client->magic = pt->magic;
client->iocs = pt->ioctl_count;
mutex_unlock(&dev->struct_mutex);

return 0;
return -EINVAL;
}

/**
Expand Down

0 comments on commit 312ab58

Please sign in to comment.