i965: Prevent coverity warning

Add assert checking that num_sources is never larger than 3.

This prevents Coverity from concluding that the unhandled
cases of num_sources not being 0-3 are relevant.

Coverity-Id: 1399480-1399489
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
This commit is contained in:
Robert Foss 2017-02-01 11:24:39 -05:00 committed by Eric Engestrom
parent 875b15eec4
commit 25f2d3c1d3

View file

@ -177,6 +177,7 @@ num_sources_from_inst(const struct gen_device_info *devinfo,
return 0;
}
} else {
assert(desc->nsrc < 4);
return desc->nsrc;
}