mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 06:40:11 +01:00
nvc0: check return value of nvc0_program_validate()
Spotted by Coverity. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
This commit is contained in:
parent
54f58210c2
commit
71135e275f
1 changed files with 1 additions and 4 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue