mesa: Check return value of __get_cpuid().
authorMatt Turner <mattst88@gmail.com>
Sat, 28 Feb 2015 18:06:26 +0000 (10:06 -0800)
committerMatt Turner <mattst88@gmail.com>
Sat, 28 Feb 2015 20:20:31 +0000 (12:20 -0800)
commite71a7f8013e540281d17a0aa1aaa3a3051592ac8
treee1bfb2f2a1e7d125eae13b8eed6f9b17de5a3b87
parent5666d9266fd43d552c76ce7b472abc0afde6c32b
mesa: Check return value of __get_cpuid().

The use of the uninitialized_var() macro was to silence an uninitialized
variable warning that I assumed stemmed from gcc being unable to see
inside __get_cpuid() or understand its inline assembly.

In fact, it was because the __get_cpuid() function can fail, and not
initialize its arguments. Instead, check for failure and return early.

Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/x86/common_x86.c