Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cab9a128 authored by Rickard Strandqvist's avatar Rickard Strandqvist Committed by Bjorn Helgaas
Browse files

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: default avatarRickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
parent f0d54a54
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -709,6 +709,7 @@ static struct pci_resource *get_max_resource(struct pci_resource **head, u32 siz
				temp = temp->next;
				temp = temp->next;
			}
			}


			if (temp)
				temp->next = max->next;
				temp->next = max->next;
		}
		}