mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-10-01 01:35:54 -04:00
14 lines
382 B
Diff
14 lines
382 B
Diff
|
diff --git a/sound/soc/codecs/rt5506.c b/sound/soc/codecs/rt5506.c
|
||
|
index 74572c4..fbce69a 100644
|
||
|
--- a/sound/soc/codecs/rt5506.c
|
||
|
+++ b/sound/soc/codecs/rt5506.c
|
||
|
@@ -676,6 +676,8 @@
|
||
|
{
|
||
|
if (mode >= rt5506_cfg_data.mode_num)
|
||
|
return -EINVAL;
|
||
|
+ if (rt5506_cfg_data.cmd_data[mode].config.reg_len > MAX_REG_DATA)
|
||
|
+ return -EINVAL;
|
||
|
|
||
|
pr_info("%s: set mode %d\n", __func__, mode);
|
||
|
|