From c134634077942404a285f6b64bc1ce5932ac22fe Mon Sep 17 00:00:00 2001 From: Mika Westerberg Date: Tue, 5 Mar 2013 12:05:16 +0200 Subject: spi/pxa2xx-pci: correct the return value check of pcim_iomap_regions() The function returns 0 on success and negative errno in case of failure. Fix this. Signed-off-by: Mika Westerberg Signed-off-by: Mark Brown --- 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 0a11dcfc631b..74bc18775658 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)); -- cgit v1.2.3