aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Skeggs2010-01-20 23:17:26 -0600
committerBen Skeggs2010-01-20 23:18:15 -0600
commit7b328122981a23f874105f333a5ec14ce887b0a8 (patch)
tree34a05e6d293c2ac4c4b1be3b7e1be2c5b333b915 /nouveau
parent9de34e2dbf5a4b3df6773460071944248cf4d571 (diff)
downloadlibdrm-7b328122981a23f874105f333a5ec14ce887b0a8.tar.gz
libdrm-7b328122981a23f874105f333a5ec14ce887b0a8.tar.xz
libdrm-7b328122981a23f874105f333a5ec14ce887b0a8.zip
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,
90 return ret; 90 return ret;
91 } 91 }
92 92
93 nouveau_pushbuf_init(&nvchan->base); 93 ret = nouveau_pushbuf_init(&nvchan->base);
94 if (ret) {
95 nouveau_channel_free((void *)&nvchan);
96 return ret;
97 }
94 98
95 *chan = &nvchan->base; 99 *chan = &nvchan->base;
96 return 0; 100 return 0;