mirror of
git://git.yoctoproject.org/linux-yocto.git
synced 2025-10-22 23:13:01 +02:00
ASoC: SDCA: correct the calculation of the maximum init table size
One initial setting is 5 bytes, so num_init_writes should divide by 5. Signed-off-by: Shuming Fan <shumingf@realtek.com> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20250721112334.388506-1-shumingf@realtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
d312962188
commit
9e55f11926
|
@ -211,7 +211,7 @@ static int find_sdca_init_table(struct device *dev,
|
|||
} else if (num_init_writes % sizeof(*raw) != 0) {
|
||||
dev_err(dev, "%pfwP: init table size invalid\n", function_node);
|
||||
return -EINVAL;
|
||||
} else if (num_init_writes > SDCA_MAX_INIT_COUNT) {
|
||||
} else if ((num_init_writes / sizeof(*raw)) > SDCA_MAX_INIT_COUNT) {
|
||||
dev_err(dev, "%pfwP: maximum init table size exceeded\n", function_node);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user