提交 cab9a128 编写于 作者: R Rickard Strandqvist 提交者: Bjorn Helgaas

PCI: cpqphp: Fix possible null pointer dereference

There is otherwise a risk of a null pointer dereference.

Found by cppcheck, a static code analysis program.
Signed-off-by: NRickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
上级 f0d54a54
......@@ -709,7 +709,8 @@ static struct pci_resource *get_max_resource(struct pci_resource **head, u32 siz
temp = temp->next;
}
temp->next = max->next;
if (temp)
temp->next = max->next;
}
max->next = NULL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册