summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2013-06-13 18:00:02 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-06-17 13:47:25 -0700
commit8b2379b49a9b7476b8421a6a404de30cd304cca1 (patch)
treeab8d46cd8fceb2d9047cc571bdbf6c8524661f68
parent54b448e5e4d2215974b959a97ead55bb9218904c (diff)
downloadop-kernel-dev-8b2379b49a9b7476b8421a6a404de30cd304cca1.zip
op-kernel-dev-8b2379b49a9b7476b8421a6a404de30cd304cca1.tar.gz
usb: chipidea: move to pcim_* functions
This patch makes error path cleaner and probe function tidier. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/usb/chipidea/ci13xxx_pci.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/drivers/usb/chipidea/ci13xxx_pci.c b/drivers/usb/chipidea/ci13xxx_pci.c
index 59fab90..7cf54956 100644
--- a/drivers/usb/chipidea/ci13xxx_pci.c
+++ b/drivers/usb/chipidea/ci13xxx_pci.c
@@ -61,14 +61,13 @@ static int ci13xxx_pci_probe(struct pci_dev *pdev,
return -ENODEV;
}
- retval = pci_enable_device(pdev);
+ retval = pcim_enable_device(pdev);
if (retval)
- goto done;
+ return retval;
if (!pdev->irq) {
dev_err(&pdev->dev, "No IRQ, check BIOS/PCI setup!");
- retval = -ENODEV;
- goto disable_device;
+ return -ENODEV;
}
pci_set_master(pdev);
@@ -84,18 +83,12 @@ static int ci13xxx_pci_probe(struct pci_dev *pdev,
plat_ci = ci13xxx_add_device(&pdev->dev, res, nres, platdata);
if (IS_ERR(plat_ci)) {
dev_err(&pdev->dev, "ci13xxx_add_device failed!\n");
- retval = PTR_ERR(plat_ci);
- goto disable_device;
+ return PTR_ERR(plat_ci);
}
pci_set_drvdata(pdev, plat_ci);
return 0;
-
- disable_device:
- pci_disable_device(pdev);
- done:
- return retval;
}
/**
@@ -111,7 +104,6 @@ static void ci13xxx_pci_remove(struct pci_dev *pdev)
struct platform_device *plat_ci = pci_get_drvdata(pdev);
ci13xxx_remove_device(plat_ci);
- pci_disable_device(pdev);
}
/**
OpenPOWER on IntegriCloud