diff options
author | Kulikov Vasiliy <segooon@gmail.com> | 2010-08-09 19:52:06 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-08-31 21:48:08 (GMT) |
commit | 4fd09f900a218c3cb61a2b015b03dcbd6f96b600 (patch) | |
tree | 5a92ea992fe2ec43a563d5fd73022cb5bbe34e49 /drivers/staging | |
parent | beef9697244991c43673716447edd8a12b177b36 (diff) | |
download | linux-fsl-qoriq-4fd09f900a218c3cb61a2b015b03dcbd6f96b600.tar.xz |
staging: spectra: call disable_pci_device() if pci_probe() failed
Driver should call disable_pci_device() if it returns from pci_probe()
with error.
Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/spectra/lld_nand.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/staging/spectra/lld_nand.c b/drivers/staging/spectra/lld_nand.c index 13c3ad2..0d647a8f 100644 --- a/drivers/staging/spectra/lld_nand.c +++ b/drivers/staging/spectra/lld_nand.c @@ -2411,13 +2411,15 @@ static int nand_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) csr_base = pci_resource_start(dev, 0); if (!csr_base) { printk(KERN_ERR "Spectra: pci_resource_start failed!\n"); - return -ENODEV; + ret = -ENODEV; + goto failed_req_csr; } csr_len = pci_resource_len(dev, 0); if (!csr_len) { printk(KERN_ERR "Spectra: pci_resource_len failed!\n"); - return -ENODEV; + ret = -ENODEV; + goto failed_req_csr; } ret = pci_request_regions(dev, SPECTRA_NAND_NAME); @@ -2464,6 +2466,7 @@ static int nand_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) failed_remap_csr: pci_release_regions(dev); failed_req_csr: + pci_disable_device(dev); return ret; } |