board-inspector: fix a branch condition that checks existence of HWP

Evaluating an XPATH on a tree results an empty list (rather than None) when
that tree does not contain any matching node. This patch fixes a branch
condition that does not check the XPATH evaluation result properly.

Tracked-On: #8168
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
This commit is contained in:
Junjie Mao 2022-10-14 22:42:07 +08:00 committed by acrnsi-robot
parent 1c532da088
commit dea357fa3b

View File

@ -138,7 +138,7 @@ def extract_topology(processors_node):
subleaf += 1
def extract_hwp_info(processors_node):
if processors_node.xpath("//capability[@id = 'hwp_supported']") is None:
if not processors_node.xpath("//capability[@id = 'hwp_supported']"):
return
# SDM Vol3 14.4.2: Additional MSRs associated with HWP may only be accessed after HWP is enabled