i965,i915: Return early if miptree allocation fails
authorChad Versace <chad.versace@linux.intel.com>
Wed, 26 Jun 2013 20:53:15 +0000 (13:53 -0700)
committerChad Versace <chad.versace@linux.intel.com>
Thu, 27 Jun 2013 20:16:47 +0000 (13:16 -0700)
commit6b676e66343356d5096260c2bc1601014c808cb0
tree4cc8efc69a0f3d7a44ce8d41d394acd4330337bb
parent670f829102f45263f32826ec2dbbbf5c367b5f54
i965,i915: Return early if miptree allocation fails

If allocation fails in intel_miptree_create_layout(), don't proceed to
dereference the miptree. Return an early NULL.

Fixes static analysis error reported by Klocwork.

Note: This is a candidate for the 9.1 branch.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
src/mesa/drivers/dri/i915/intel_mipmap_tree.c
src/mesa/drivers/dri/i965/intel_mipmap_tree.c