nouveau: fail channel creation if pushbuf init fails

This commit is contained in:
Ben Skeggs 2010-01-21 15:17:26 +10:00
parent 9de34e2dbf
commit 7b32812298

View file

@ -90,7 +90,11 @@ nouveau_channel_alloc(struct nouveau_device *dev, uint32_t fb_ctxdma,
return ret;
}
nouveau_pushbuf_init(&nvchan->base);
ret = nouveau_pushbuf_init(&nvchan->base);
if (ret) {
nouveau_channel_free((void *)&nvchan);
return ret;
}
*chan = &nvchan->base;
return 0;