Commit c5c1546
ASoC: codecs: wcd938x: fix incorrect used of portid
Mixer controls have the channel id in mixer->reg, which is not same
as port id. port id should be derived from chan_info array.
So fix this. Without this, its possible that we could corrupt
struct wcd938x_sdw_priv by accessing port_map array out of range
with channel id instead of port id.
Fixes: e8ba1e0 ("ASoC: codecs: wcd938x: add basic controls")
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220126113549.8853-2-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>1 parent 4cf28e9 commit c5c1546
1 file changed
Lines changed: 14 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1432 | 1432 | | |
1433 | 1433 | | |
1434 | 1434 | | |
1435 | | - | |
| 1435 | + | |
1436 | 1436 | | |
1437 | | - | |
1438 | | - | |
1439 | | - | |
1440 | | - | |
1441 | 1437 | | |
1442 | | - | |
| 1438 | + | |
1443 | 1439 | | |
1444 | 1440 | | |
1445 | 1441 | | |
| |||
2593 | 2589 | | |
2594 | 2590 | | |
2595 | 2591 | | |
| 2592 | + | |
2596 | 2593 | | |
2597 | 2594 | | |
2598 | 2595 | | |
| |||
2606 | 2603 | | |
2607 | 2604 | | |
2608 | 2605 | | |
| 2606 | + | |
| 2607 | + | |
2609 | 2608 | | |
2610 | | - | |
| 2609 | + | |
2611 | 2610 | | |
2612 | | - | |
| 2611 | + | |
2613 | 2612 | | |
2614 | 2613 | | |
2615 | 2614 | | |
| |||
2882 | 2881 | | |
2883 | 2882 | | |
2884 | 2883 | | |
2885 | | - | |
| 2884 | + | |
| 2885 | + | |
2886 | 2886 | | |
2887 | 2887 | | |
| 2888 | + | |
2888 | 2889 | | |
2889 | 2890 | | |
2890 | 2891 | | |
| |||
2899 | 2900 | | |
2900 | 2901 | | |
2901 | 2902 | | |
2902 | | - | |
| 2903 | + | |
| 2904 | + | |
2903 | 2905 | | |
2904 | 2906 | | |
2905 | 2907 | | |
2906 | 2908 | | |
2907 | 2909 | | |
| 2910 | + | |
2908 | 2911 | | |
2909 | 2912 | | |
2910 | 2913 | | |
2911 | 2914 | | |
2912 | 2915 | | |
2913 | 2916 | | |
2914 | 2917 | | |
2915 | | - | |
| 2918 | + | |
2916 | 2919 | | |
2917 | 2920 | | |
2918 | 2921 | | |
| |||
0 commit comments