diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2014-08-27 16:21:12 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-10-05 14:52:16 -0700 |
commit | 54ad9868865d9c9211bb0a0a52f4f2c928cae69c (patch) | |
tree | dd7145d4c2dde2324c2e4ee8423d2bf18deb282b /drivers/spi | |
parent | 0f6238ed24423de60a59f24151966fde6a780760 (diff) | |
download | linux-stable-54ad9868865d9c9211bb0a0a52f4f2c928cae69c.tar.gz linux-stable-54ad9868865d9c9211bb0a0a52f4f2c928cae69c.tar.bz2 linux-stable-54ad9868865d9c9211bb0a0a52f4f2c928cae69c.zip |
spi: dw-pci: fix bug when regs left uninitialized
commit c9d5d6fe168fd45a4dfdd0116affe708789b4702 upstream.
The commit 04f421e7 "spi: dw: use managed resources" changes drivers to use
managed functions, but seems wasn't properly tested in PCI case. The regs field
of struct dw_spi left uninitialized. Thus, kernel crashes when tries to access
to the SPI controller registers. This patch fixes the issue.
Fixes: 04f421e7 (spi: dw: use managed resources)
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/spi-dw-pci.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/spi/spi-dw-pci.c b/drivers/spi/spi-dw-pci.c index 3f3dc1226edf..e14960470d8d 100644 --- a/drivers/spi/spi-dw-pci.c +++ b/drivers/spi/spi-dw-pci.c @@ -62,6 +62,8 @@ static int spi_pci_probe(struct pci_dev *pdev, if (ret) return ret; + dws->regs = pcim_iomap_table(pdev)[pci_bar]; + dws->bus_num = 0; dws->num_cs = 4; dws->irq = pdev->irq; |