]> www.infradead.org Git - users/jedix/linux-maple.git/commit
i2c: mt65xx: Avoid double initialization of restart_flag in isr
authorAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Tue, 6 Aug 2024 09:45:37 +0000 (11:45 +0200)
committerAndi Shyti <andi.shyti@kernel.org>
Mon, 9 Sep 2024 22:33:54 +0000 (00:33 +0200)
commitab5bd055e4dbb849d5d77c9a6d908e6f3bed58ed
treefefd804249b08171bc14a4f433a7e25e831fa1cf
parent1dc8baa408a2e873f69fc356fbbc0bddb7813839
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>
drivers/i2c/busses/i2c-mt65xx.c