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: upstream/snapshot3+hdmi~5283^2~67 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c134634077942404a285f6b64bc1ce5932ac22fe;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.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 0a11dcfc..74bc187 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));