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

Commit 01c3521f authored by Christophe Jaillet's avatar Christophe Jaillet Committed by David S. Miller
Browse files

arcnet: com20020-pci: Fix an error handling path in 'com20020pci_probe()'



If this memory allocation fails, we should go through the error handling
path as done everywhere else in this function before returning.

Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent df7c7dd2
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -225,8 +225,10 @@ static int com20020pci_probe(struct pci_dev *pdev,

		card = devm_kzalloc(&pdev->dev, sizeof(struct com20020_dev),
				    GFP_KERNEL);
		if (!card)
			return -ENOMEM;
		if (!card) {
			ret = -ENOMEM;
			goto out_port;
		}

		card->index = i;
		card->pci_priv = priv;