x86/tboot: check return value of dmar_table allocation
authorHongyan Xia <hongyxia@amazon.com>
Tue, 24 Mar 2020 09:44:22 +0000 (10:44 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 24 Mar 2020 09:44:22 +0000 (10:44 +0100)
commitdaed26bb7ff6714e1c2eaa3dc980c4ce4343e307
tree0a87898b9f7916ca6430eef156989cdc0823eb75
parentf10df652c78cbdd0c25e93767baad55b022af5be
x86/tboot: check return value of dmar_table allocation

The allocation can just return NULL. Return an error value early instead
of crashing later on.

Signed-off-by: Hongyan Xia <hongyxia@amazon.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/tboot.c