]> git.ipfire.org Git - thirdparty/linux.git/commit
ASoC: mediatek: mt2701: fix snprintf bounds
authorRosen Penev <rosenp@gmail.com>
Fri, 22 May 2026 01:45:15 +0000 (18:45 -0700)
committerMark Brown <broonie@kernel.org>
Mon, 1 Jun 2026 13:59:59 +0000 (14:59 +0100)
commit6c52e58dbdaed2eea6cd10461e6b7fb3de4c99d5
tree8cc70b76db5410d35a739a519019b18782db3991
parent98d08b2e0e92ea39ac6743dcfdda1af676514c4b
ASoC: mediatek: mt2701: fix snprintf bounds

For whatever reason, GCC is unable to figure out that i2s_num is a
single digit number, with MT2701_BASE_CLK_NUM being the maximum value it
represents. Add a min() call to help it out and fix W=1 errors regarding
snprintf bounds.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://patch.msgid.link/20260522014515.719973-1-rosenp@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c