pcmcia: pd6729: fix error return code in pd6729_pci_probe()
Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
38a4671cad
commit
214da6728a
|
@ -644,6 +644,7 @@ static int pd6729_pci_probe(struct pci_dev *dev,
|
||||||
if (!pci_resource_start(dev, 0)) {
|
if (!pci_resource_start(dev, 0)) {
|
||||||
dev_warn(&dev->dev, "refusing to load the driver as the "
|
dev_warn(&dev->dev, "refusing to load the driver as the "
|
||||||
"io_base is NULL.\n");
|
"io_base is NULL.\n");
|
||||||
|
ret = -ENOMEM;
|
||||||
goto err_out_disable;
|
goto err_out_disable;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -673,6 +674,7 @@ static int pd6729_pci_probe(struct pci_dev *dev,
|
||||||
mask = pd6729_isa_scan();
|
mask = pd6729_isa_scan();
|
||||||
if (irq_mode == 0 && mask == 0) {
|
if (irq_mode == 0 && mask == 0) {
|
||||||
dev_warn(&dev->dev, "no ISA interrupt is available.\n");
|
dev_warn(&dev->dev, "no ISA interrupt is available.\n");
|
||||||
|
ret = -ENODEV;
|
||||||
goto err_out_free_res;
|
goto err_out_free_res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue