mirror of
https://github.com/torvalds/linux.git
synced 2026-06-02 03:24:19 +02:00
ASoC: SDCA: Add missing default in switch in entity_pde_event()
The current code should be safe as the PDE widget only registers for the
two events handled in the switch statement. However, it is causing a
smatch warning and also is a little fragile to future code changes, add
a default case to avoid the warning and make the code more robust.
Fixes: 2c8b3a8e6a ("ASoC: SDCA: Create DAPM widgets and routes from DisCo")
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
Link: https://patch.msgid.link/20250624122844.2761627-3-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
0383a710d2
commit
2ed526bf04
|
|
@ -397,6 +397,8 @@ static int entity_pde_event(struct snd_soc_dapm_widget *widget,
|
|||
from = widget->off_val;
|
||||
to = widget->on_val;
|
||||
break;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
||||
for (i = 0; i < entity->pde.num_max_delay; i++) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user