From: Mika Westerberg Date: Tue, 5 Mar 2013 10:05:16 +0000 (+0200) Subject: spi/pxa2xx-pci: correct the return value check of pcim_iomap_regions() X-Git-Tag: next-20130320~35^2~12 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=c134634077942404a285f6b64bc1ce5932ac22fe;p=karo-tx-linux.git 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 --- 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));