spi/pxa2xx-pci: correct the return value check of pcim_iomap_regions()
authorMika Westerberg <mika.westerberg@linux.intel.com>
Tue, 5 Mar 2013 10:05:16 +0000 (12:05 +0200)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 12 Mar 2013 18:30:56 +0000 (18:30 +0000)
The function returns 0 on success and negative errno in case of failure.
Fix this.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
drivers/spi/spi-pxa2xx-pci.c

index 0a11dcf..74bc187 100644 (file)
@@ -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));