mirror of
https://github.com/torvalds/linux.git
synced 2026-05-12 16:18:45 +02:00
spi: spi-dw-dma: fix print error log when wait finish transaction
If an error occurs, the device may not have a current message. In this case, the system will crash. In this case, it's better to use dev from the struct ctlr (struct spi_controller*). Signed-off-by: Vladimir Yakovlev <vovchkir@gmail.com> Link: https://patch.msgid.link/20260302222017.992228-2-vovchkir@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
11439c4635
commit
3b46d61890
|
|
@ -271,7 +271,7 @@ static int dw_spi_dma_wait(struct dw_spi *dws, unsigned int len, u32 speed)
|
|||
msecs_to_jiffies(ms));
|
||||
|
||||
if (ms == 0) {
|
||||
dev_err(&dws->ctlr->cur_msg->spi->dev,
|
||||
dev_err(&dws->ctlr->dev,
|
||||
"DMA transaction timed out\n");
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user