Mesa (master): nvc0: bsp_bo can't be null
Ilia Mirkin
imirkin at kemper.freedesktop.org
Sun Jan 17 21:40:15 UTC 2016
Module: Mesa
Branch: master
Commit: 5a81b48ad0a895d4a609bb9eddd55a9456cb9091
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=5a81b48ad0a895d4a609bb9eddd55a9456cb9091
Author: Ilia Mirkin <imirkin at alum.mit.edu>
Date: Sun Jan 17 03:41:55 2016 -0500
nvc0: bsp_bo can't be null
We already deref it earlier. And these are all allocated on load.
Spotted by Coverity.
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
---
src/gallium/drivers/nouveau/nvc0/nvc0_video_bsp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_video_bsp.c b/src/gallium/drivers/nouveau/nvc0/nvc0_video_bsp.c
index c53f946..af072a8 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_video_bsp.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_video_bsp.c
@@ -64,7 +64,7 @@ nvc0_decoder_bsp_next(struct nouveau_vp3_decoder *dec,
bsp_size += num_bytes[i];
bsp_size += 256; /* the 4 end markers */
- if (!bsp_bo || bsp_size > bsp_bo->size) {
+ if (bsp_size > bsp_bo->size) {
union nouveau_bo_config cfg;
struct nouveau_bo *tmp_bo = NULL;
More information about the mesa-commit
mailing list