i2c: mt65xx: Avoid double initialization of restart_flag in isr

In the mtk_i2c_irq() handler, variable restart_flag is initialized
to zero and then reassigned with I2C_RS_TRANSFER if and only if
auto_restart is enabled.

Avoid a double initialization of this variable by transferring the
auto_restart check to the restart_flag declaration.

This commit brings no functional changes.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
This commit is contained in:
AngeloGioacchino Del Regno 2024-08-06 11:45:37 +02:00 • committed by Andi Shyti
commit ab5bd055e4