mirror of https://gitee.com/openkylin/linux.git
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: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
This commit is contained in:
parent
f0d54a5417
commit
cab9a128da
|
@ -709,6 +709,7 @@ static struct pci_resource *get_max_resource(struct pci_resource **head, u32 siz
|
|||
temp = temp->next;
|
||||
}
|
||||
|
||||
if (temp)
|
||||
temp->next = max->next;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue