mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
spi: tegra: fix error setting on timeout
avoids derefencing an uninitialized pointer Change-Id: Icf528441ae481e9f6f5ddc0be32c7c217fa49701 Signed-off-by: Erik Gilling <konkers@android.com>
This commit is contained in:
parent
0c03a1dd5b
commit
f41649e040
1 changed files with 4 additions and 4 deletions
|
@ -338,15 +338,15 @@ static void tegra_spi_rx_dma_complete(struct tegra_dma_req *req)
|
||||||
|
|
||||||
spin_lock_irqsave(&tspi->lock, flags);
|
spin_lock_irqsave(&tspi->lock, flags);
|
||||||
|
|
||||||
if (timeout >= 1000)
|
|
||||||
m->status = -EIO;
|
|
||||||
|
|
||||||
val = spi_tegra_readl(tspi, SLINK_STATUS);
|
val = spi_tegra_readl(tspi, SLINK_STATUS);
|
||||||
val |= SLINK_RDY;
|
val |= SLINK_RDY;
|
||||||
spi_tegra_writel(tspi, val, SLINK_STATUS);
|
spi_tegra_writel(tspi, val, SLINK_STATUS);
|
||||||
|
|
||||||
|
|
||||||
m = list_first_entry(&tspi->queue, struct spi_message, queue);
|
m = list_first_entry(&tspi->queue, struct spi_message, queue);
|
||||||
|
|
||||||
|
if (timeout >= 1000)
|
||||||
|
m->status = -EIO;
|
||||||
|
|
||||||
spi = m->state;
|
spi = m->state;
|
||||||
|
|
||||||
tspi->cur_pos += spi_tegra_drain_rx_fifo(tspi, tspi->cur);
|
tspi->cur_pos += spi_tegra_drain_rx_fifo(tspi, tspi->cur);
|
||||||
|
|
Loading…
Add table
Reference in a new issue