Commit 326fe81
ASoC: adau1372: Fix unchecked clk_prepare_enable() return value
adau1372_set_power() calls clk_prepare_enable() but discards the return
value. If the clock enable fails, the driver proceeds to access registers
on unpowered hardware, potentially causing silent corruption.
Make adau1372_set_power() return int and propagate the error from
clk_prepare_enable(). Update adau1372_set_bias_level() to return the
error directly for the STANDBY and OFF cases.
Signed-off-by: Jihed Chaibi <[email protected]>
Fixes: 6cd4c64 ("ASoC: Add ADAU1372 audio CODEC support")
Reviewed-by: Nuno Sá <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Mark Brown <[email protected]>1 parent c369299 commit 326fe81
1 file changed
Lines changed: 10 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
782 | 782 | | |
783 | 783 | | |
784 | 784 | | |
785 | | - | |
| 785 | + | |
786 | 786 | | |
787 | 787 | | |
788 | | - | |
| 788 | + | |
789 | 789 | | |
790 | 790 | | |
791 | 791 | | |
| 792 | + | |
792 | 793 | | |
793 | | - | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
794 | 797 | | |
795 | 798 | | |
796 | 799 | | |
| |||
829 | 832 | | |
830 | 833 | | |
831 | 834 | | |
| 835 | + | |
| 836 | + | |
832 | 837 | | |
833 | 838 | | |
834 | 839 | | |
| |||
842 | 847 | | |
843 | 848 | | |
844 | 849 | | |
845 | | - | |
846 | | - | |
| 850 | + | |
847 | 851 | | |
848 | | - | |
849 | | - | |
| 852 | + | |
850 | 853 | | |
851 | 854 | | |
852 | 855 | | |
| |||
0 commit comments