Only return FIFO number if the FIFO is marked as in use..

main
Ben Skeggs 2006-11-18 10:09:29 +11:00
parent e9194dd1b0
commit 9ac7a8b0b4
1 changed files with 1 additions and 1 deletions

View File

@ -564,7 +564,7 @@ int nouveau_fifo_id_get(drm_device_t* dev, DRMFILE filp)
int i;
for(i=0;i<nouveau_fifo_number(dev);i++)
if (dev_priv->fifos[i].filp == filp)
if (dev_priv->fifos[i].used && dev_priv->fifos[i].filp == filp)
return i;
return -1;
}