aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/agnx
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2009-03-26 09:34:09 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2009-06-19 11:00:35 -0700
commit8af6caf5d37aaa56911c15f9a7386fe93ff01f7e (patch)
tree67654048b18145d932d9b80dbfe0086e672a28ae /drivers/staging/agnx
parenta505fe716de71e0b52db9f13d9bfe93d42a31fbc (diff)
staging: agnx, fix fail paths in probe
Return error on fail paths instead of 0. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/agnx')
-rw-r--r--drivers/staging/agnx/pci.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/staging/agnx/pci.c b/drivers/staging/agnx/pci.c
index 3aef9aab47e..e5bf9a2a768 100644
--- a/drivers/staging/agnx/pci.c
+++ b/drivers/staging/agnx/pci.c
@@ -473,6 +473,7 @@ static int __devinit agnx_pci_probe(struct pci_dev *pdev,
if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32)) ||
pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32))) {
dev_err(&pdev->dev, "no suitable DMA available\n");
+ err = -EIO;
goto err_free_reg;
}
@@ -496,11 +497,13 @@ static int __devinit agnx_pci_probe(struct pci_dev *pdev,
/* dev_dbg(&pdev->dev, "MEM1 mapped address is 0x%p\n", priv->ctl); */
if (!priv->ctl) {
dev_err(&pdev->dev, "can't map device memory\n");
+ err = -ENOMEM;
goto err_free_dev;
}
priv->data = pci_iomap(pdev, 1, 0);
if (!priv->data) {
dev_err(&pdev->dev, "can't map device memory\n");
+ err = -ENOMEM;
goto err_iounmap2;
}