summaryrefslogtreecommitdiff
path: root/nouveau
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2010-01-21 15:17:26 +1000
committerBen Skeggs <bskeggs@redhat.com>2010-01-21 15:18:15 +1000
commit7b328122981a23f874105f333a5ec14ce887b0a8 (patch)
tree34a05e6d293c2ac4c4b1be3b7e1be2c5b333b915 /nouveau
parent9de34e2dbf5a4b3df6773460071944248cf4d571 (diff)
nouveau: fail channel creation if pushbuf init fails
Diffstat (limited to 'nouveau')
-rw-r--r--nouveau/nouveau_channel.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/nouveau/nouveau_channel.c b/nouveau/nouveau_channel.c
index 01d6681b..5622c1d9 100644
--- a/nouveau/nouveau_channel.c
+++ b/nouveau/nouveau_channel.c
@@ -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;