@@ -344,11 +344,11 @@ static int lpss8250_probe(struct pci_dev *pdev, const struct pci_device_id *id)
uart.port.mapbase = pci_resource_start(pdev, 0);
uart.port.membase = pcim_iomap(pdev, 0, 0);
if (!uart.port.membase)
- return -ENOMEM;
+ goto free_irq_vectors;
ret = lpss->board->setup(lpss, &uart.port);
if (ret)
- return ret;
+ goto free_irq_vectors;
dw8250_setup_port(&uart.port);
@@ -367,6 +367,7 @@ static int lpss8250_probe(struct pci_dev *pdev, const struct pci_device_id *id)
err_exit:
lpss->board->exit(lpss);
+free_irq_vectors:
pci_free_irq_vectors(pdev);
return ret;
}