[PATCH 1/2] spi/pxa2xx-pci: correct the return value check of pcim_iomap_regions()

From: Mika Westerberg
Date: Tue Mar 05 2013 - 05:03:59 EST


The function returns 0 on success and negative errno in case of failure.
Fix this.

Signed-off-by: Mika Westerberg <mika.westerberg@xxxxxxxxxxxxxxx>
---
drivers/spi/spi-pxa2xx-pci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/spi-pxa2xx-pci.c b/drivers/spi/spi-pxa2xx-pci.c
index 364964d..48abae5 100644
--- a/drivers/spi/spi-pxa2xx-pci.c
+++ b/drivers/spi/spi-pxa2xx-pci.c
@@ -22,7 +22,7 @@ static int ce4100_spi_probe(struct pci_dev *dev,
return ret;

ret = pcim_iomap_regions(dev, 1 << 0, "PXA2xx SPI");
- if (!ret)
+ if (ret)
return ret;

memset(&spi_pdata, 0, sizeof(spi_pdata));
--
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/