[PATCH v3 2/5] spi: dw: remove useless dws->transfer_handler check
From: Jisheng Zhang
Date: Wed Sep 09 2026 - 11:11:44 EST
transfer_handler is initialized before any DW SPI interrupt is
unmasked. While the IRQ is registered but the handler is NULL,
dw_spi_hw_init() has all DW SPI interrupts disabled. Therefore
dw_spi_irq() cannot observe a DW SPI interrupt with a NULL
transfer_handler.
Signed-off-by: Jisheng Zhang <jszhang@xxxxxxxxxx>
---
drivers/spi/spi-dw-core.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/spi/spi-dw-core.c b/drivers/spi/spi-dw-core.c
index 1c060f0ec50c..f4c4e9dae25e 100644
--- a/drivers/spi/spi-dw-core.c
+++ b/drivers/spi/spi-dw-core.c
@@ -280,8 +280,7 @@ static irqreturn_t dw_spi_irq(int irq, void *dev_id)
if (!irq_status)
return IRQ_NONE;
- if (!dws->transfer_handler ||
- (!ctlr->cur_msg && dws->transfer_handler == dw_spi_transfer_handler)) {
+ if (!ctlr->cur_msg && dws->transfer_handler == dw_spi_transfer_handler) {
dw_spi_mask_intr(dws, 0xff);
return IRQ_HANDLED;
}
--
2.53.0