Skip to content

Commit

Permalink
spi: pxa2xx-pci: Remove unused code
Browse files Browse the repository at this point in the history
pcim_iomap_table() can't fail when called after pcim_iomap_regions(). Moreover,
we already dereference returned value and kernel will crash if it is not
correct.

Remove obvious leftover of commit 0202775 ("spi/pxa2xx-pci: switch to use
pcim_* interfaces").

Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Andy Shevchenko authored and Mark Brown committed Jul 4, 2016
1 parent 4f47091 commit 21ddba1
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions drivers/spi/spi-pxa2xx-pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,6 @@ static int pxa2xx_spi_pci_probe(struct pci_dev *dev,
ssp = &spi_pdata.ssp;
ssp->phys_base = pci_resource_start(dev, 0);
ssp->mmio_base = pcim_iomap_table(dev)[0];
if (!ssp->mmio_base) {
dev_err(&dev->dev, "failed to ioremap() registers\n");
return -EIO;
}
ssp->irq = dev->irq;
ssp->port_id = (c->port_id >= 0) ? c->port_id : dev->devfn;
ssp->type = c->type;
Expand Down

0 comments on commit 21ddba1

Please sign in to comment.