Commit 750dc2f
ASoC: rt5682s: Fix crash due to out of scope stack vars
Move the declaration of temporary arrays to somewhere that won't go out
of scope before the devm_clk_hw_register() call, lest we be at the whim
of the compiler for whether those stack variables get overwritten.
Fixes a crash seen with gcc version 11.2.1 20210728 (Red Hat 11.2.1-1)
Fixes: bdd229a ("ASoC: rt5682s: Add driver for ALC5682I-VS codec")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Link: https://lore.kernel.org/r/20211118010453.843286-2-robdclark@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>1 parent 4999d70 commit 750dc2f
1 file changed
Lines changed: 6 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2693 | 2693 | | |
2694 | 2694 | | |
2695 | 2695 | | |
| 2696 | + | |
| 2697 | + | |
2696 | 2698 | | |
2697 | 2699 | | |
2698 | 2700 | | |
2699 | 2701 | | |
2700 | 2702 | | |
2701 | 2703 | | |
2702 | 2704 | | |
2703 | | - | |
| 2705 | + | |
2704 | 2706 | | |
2705 | 2707 | | |
| 2708 | + | |
2706 | 2709 | | |
2707 | 2710 | | |
2708 | 2711 | | |
2709 | 2712 | | |
2710 | 2713 | | |
2711 | | - | |
2712 | | - | |
2713 | | - | |
| 2714 | + | |
| 2715 | + | |
2714 | 2716 | | |
2715 | 2717 | | |
2716 | 2718 | | |
| |||
0 commit comments