Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 228840
b: refs/heads/master
c: 8e91182
h: refs/heads/master
v: v3
  • Loading branch information
Michel Hermier authored and Ben Skeggs committed Dec 27, 2010
1 parent 7c0fedd commit 91e35c3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c42988012ad9c1807b7c7a5ff855cd630094989b
refs/heads/master: 8e91182bbdb8591be4835907d825a5b9a80495a9
3 changes: 3 additions & 0 deletions trunk/drivers/gpu/drm/nouveau/nouveau_channel.c
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,9 @@ nouveau_channel_get(struct drm_device *dev, struct drm_file *file_priv, int id)
struct nouveau_channel *chan;
unsigned long flags;

if (unlikely(id < 0 || id >= NOUVEAU_MAX_CHANNEL_NR))
return ERR_PTR(-EINVAL);

spin_lock_irqsave(&dev_priv->channels.lock, flags);
chan = nouveau_channel_get_unlocked(dev_priv->channels.ptr[id]);
spin_unlock_irqrestore(&dev_priv->channels.lock, flags);
Expand Down

0 comments on commit 91e35c3

Please sign in to comment.