]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: SOF: loader: fix snd_sof_fw_parse_ext_data
authorKarol Trzcinski <karolx.trzcinski@linux.intel.com>
Tue, 10 Dec 2019 00:48:49 +0000 (18:48 -0600)
committerMark Brown <broonie@kernel.org>
Tue, 10 Dec 2019 13:11:19 +0000 (13:11 +0000)
commit71f64f9c7d98031550ca2963ddbeb7846e1064c2
tree8c3a19e5410b8b69ef81f5d22f333aa4edfe99ed
parent347e18c4ca0f1061c5860a3a996a483963a0f8d5
ASoC: SOF: loader: fix snd_sof_fw_parse_ext_data

An error occurs during parsing more than one ext_data from the mailbox, because
of invalid data offset handling. Fix by removing the incorrect duplicate
increment of the offset.

The return value is also reset in the switch case. This does not change the
behavior but improves readability - there is no longer a need to check what the
return value of get_ext_windows is.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20191210004854.16845-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/loader.c