Is this a bug in function nouveau_client_new
The ffs
function will find first set bit. But I think the intention here was to find the first zero bit.
If I call nouveau_client_new
multiple times, all the nouveau_client
would have the same id.
for (i = 0; i < nvdev->nr_client; i++) {
id = ffs(nvdev->client[i]) - 1;
if (id >= 0)
goto out;
}