Skip to content

Commit 3b46d61

Browse files
vmyakovlevbroonie
authored andcommitted
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>
1 parent 11439c4 commit 3b46d61

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/spi/spi-dw-dma.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ static int dw_spi_dma_wait(struct dw_spi *dws, unsigned int len, u32 speed)
271271
msecs_to_jiffies(ms));
272272

273273
if (ms == 0) {
274-
dev_err(&dws->ctlr->cur_msg->spi->dev,
274+
dev_err(&dws->ctlr->dev,
275275
"DMA transaction timed out\n");
276276
return -ETIMEDOUT;
277277
}

0 commit comments

Comments
 (0)