|
@@ -678,10 +678,9 @@ static int pcifront_connect_and_init_dma(struct pcifront_device *pdev)
|
|
|
if (!pcifront_dev) {
|
|
if (!pcifront_dev) {
|
|
|
dev_info(&pdev->xdev->dev, "Installing PCI frontend\n");
|
|
dev_info(&pdev->xdev->dev, "Installing PCI frontend\n");
|
|
|
pcifront_dev = pdev;
|
|
pcifront_dev = pdev;
|
|
|
- } else {
|
|
|
|
|
- dev_err(&pdev->xdev->dev, "PCI frontend already installed!\n");
|
|
|
|
|
|
|
+ } else
|
|
|
err = -EEXIST;
|
|
err = -EEXIST;
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
spin_unlock(&pcifront_dev_lock);
|
|
spin_unlock(&pcifront_dev_lock);
|
|
|
|
|
|
|
|
if (!err && !swiotlb_nr_tbl()) {
|
|
if (!err && !swiotlb_nr_tbl()) {
|
|
@@ -848,7 +847,7 @@ static int pcifront_try_connect(struct pcifront_device *pdev)
|
|
|
goto out;
|
|
goto out;
|
|
|
|
|
|
|
|
err = pcifront_connect_and_init_dma(pdev);
|
|
err = pcifront_connect_and_init_dma(pdev);
|
|
|
- if (err) {
|
|
|
|
|
|
|
+ if (err && err != -EEXIST) {
|
|
|
xenbus_dev_fatal(pdev->xdev, err,
|
|
xenbus_dev_fatal(pdev->xdev, err,
|
|
|
"Error setting up PCI Frontend");
|
|
"Error setting up PCI Frontend");
|
|
|
goto out;
|
|
goto out;
|