[PATCH v2 2/2] ASoC: fsl: imx-card: initialize playback_only and capture_only

From: Shengjiu Wang

Date: Mon Mar 16 2026 - 23:42:20 EST


Fix uninitialized variable playback_only and capture_only because
graph_util_parse_link_direction() may not write them.

Fixes: 1877c3e7937f ("ASoC: imx-card: Add playback_only or capture_only support")
Suggested-by: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx>
Signed-off-by: Shengjiu Wang <shengjiu.wang@xxxxxxx>
---
sound/soc/fsl/imx-card.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/fsl/imx-card.c b/sound/soc/fsl/imx-card.c
index 05b4e971a366..4dba52ecc602 100644
--- a/sound/soc/fsl/imx-card.c
+++ b/sound/soc/fsl/imx-card.c
@@ -544,7 +544,7 @@ static int imx_card_parse_of(struct imx_card_data *data)
struct snd_soc_dai_link *link;
struct dai_link_data *link_data;
struct of_phandle_args args;
- bool playback_only, capture_only;
+ bool playback_only = false, capture_only = false;
int ret, num_links;
u32 asrc_fmt = 0;
u32 width;
--
2.34.1