public inbox for linux-spi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] spi: spi-dw-dma: fix print error log when wait finish transaction
@ 2026-03-02 11:32 Vladimir Yakovlev
  2026-03-02 13:32 ` Mark Brown
  2026-03-03 14:20 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Vladimir Yakovlev @ 2026-03-02 11:32 UTC (permalink / raw)
  To: Mark Brown; +Cc: Vladimir Yakovlev, linux-spi, linux-kernel

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 host.

Signed-off-by: Vladimir Yakovlev <vovchkir@gmail.com>
---
 drivers/spi/spi-dw-dma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/spi-dw-dma.c b/drivers/spi/spi-dw-dma.c
index 65adec7c7524..d83466166abe 100644
--- a/drivers/spi/spi-dw-dma.c
+++ b/drivers/spi/spi-dw-dma.c
@@ -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->host->dev,
 			"DMA transaction timed out\n");
 		return -ETIMEDOUT;
 	}
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-03-03 14:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-02 11:32 [PATCH] spi: spi-dw-dma: fix print error log when wait finish transaction Vladimir Yakovlev
2026-03-02 13:32 ` Mark Brown
2026-03-03 14:20 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox