nouveau: fail channel creation if pushbuf init fails

main
Ben Skeggs 2010-01-21 15:17:26 +10:00
parent 9de34e2dbf
commit 7b32812298
1 changed files with 5 additions and 1 deletions

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;