diff options
author | Samuel Pitoiset <[email protected]> | 2015-12-14 18:07:33 +0100 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2015-12-14 19:08:42 +0100 |
commit | 71135e275fd99d29e6e67d830c7c1bced662322f (patch) | |
tree | 267dcc848628d9664d87e743183e1c8b2f208013 /src/gallium/drivers | |
parent | 54f58210c29e358185b1bbaea70c5c2a76a07d44 (diff) |
nvc0: check return value of nvc0_program_validate()
Spotted by Coverity.
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/nouveau/nvc0/nvc0_shader_state.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_shader_state.c b/src/gallium/drivers/nouveau/nvc0/nvc0_shader_state.c index 7e2e9992fe8..5e84ca9e0ea 100644 --- a/src/gallium/drivers/nouveau/nvc0/nvc0_shader_state.c +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_shader_state.c @@ -236,11 +236,8 @@ nvc0_gmtyprog_validate(struct nvc0_context *nvc0) struct nouveau_pushbuf *push = nvc0->base.pushbuf; struct nvc0_program *gp = nvc0->gmtyprog; - if (gp) - nvc0_program_validate(nvc0, gp); - /* we allow GPs with no code for specifying stream output state only */ - if (gp && gp->code_size) { + if (gp && nvc0_program_validate(nvc0, gp) && gp->code_size) { const bool gp_selects_layer = !!(gp->hdr[13] & (1 << 9)); BEGIN_NVC0(push, NVC0_3D(MACRO_GP_SELECT), 1); |