diff --git a/drivers/spi/spi-axi-spi-engine.c b/drivers/spi/spi-axi-spi-engine.c index 050096874afe9..47449760b252e 100644 --- a/drivers/spi/spi-axi-spi-engine.c +++ b/drivers/spi/spi-axi-spi-engine.c @@ -628,6 +628,8 @@ static int spi_engine_transfer_one_message(struct spi_master *master, return -ENOMEM; spi_engine_compile_message(spi_engine, msg, false, p); + mod_timer(&spi_engine->watchdog_timer, jiffies + 5 * HZ); + spin_lock_irqsave(&spi_engine->lock, flags); spi_engine->sync_id = (spi_engine->sync_id + 1) & 0xff; spi_engine_program_add_cmd(p, false, @@ -656,8 +658,6 @@ static int spi_engine_transfer_one_message(struct spi_master *master, spi_engine->int_enable = int_enable; spin_unlock_irqrestore(&spi_engine->lock, flags); - mod_timer(&spi_engine->watchdog_timer, jiffies + 5*HZ); - return 0; }