Browse Source

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 <mika.westerberg@linux.intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mika Westerberg 12 years ago
parent
commit
c134634077
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/spi/spi-pxa2xx-pci.c

+ 1 - 1
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));