diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2011-06-23 15:47:32 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2011-06-23 16:04:53 +1000 |
commit | 9a11dd65875f9e2401ded5d9a777574eacab814c (patch) | |
tree | 672dd9301139c24eaa3134794112d9c367a345c8 /drivers/gpu/drm/nouveau | |
parent | 6d13e9c18843092f3df418b42183f704f6dac053 (diff) | |
download | linux-9a11dd65875f9e2401ded5d9a777574eacab814c.tar.bz2 |
drm/nouveau: fix off-by-one
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_object.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_object.c b/drivers/gpu/drm/nouveau/nouveau_object.c index fb57c1110d24..159b7c437d3f 100644 --- a/drivers/gpu/drm/nouveau/nouveau_object.c +++ b/drivers/gpu/drm/nouveau/nouveau_object.c @@ -125,7 +125,7 @@ nouveau_gpuobj_mthd_call2(struct drm_device *dev, int chid, int ret = -EINVAL; spin_lock_irqsave(&dev_priv->channels.lock, flags); - if (chid > 0 && chid < dev_priv->engine.fifo.channels) + if (chid >= 0 && chid < dev_priv->engine.fifo.channels) chan = dev_priv->channels.ptr[chid]; if (chan) ret = nouveau_gpuobj_mthd_call(chan, class, mthd, data); |