From b0ca1b7b89d811efdce8e798ecf795be3fd35f2d Mon Sep 17 00:00:00 2001 From: Zhong Shengquan Date: Mon, 23 Sep 2024 20:48:14 +0800 Subject: [PATCH] ASoC: rockchip: asrc: Fix asrc get parent clock error Fix the if condition logic in the rockchip_asrc_get_clk_parent function by replacing the third "&&" with "||". Change-Id: Ib5c00812bb72c0443ea9565e8d669f7a7fafd156 Signed-off-by: Zhong Shengquan --- sound/soc/rockchip/rockchip_asrc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/rockchip/rockchip_asrc.c b/sound/soc/rockchip/rockchip_asrc.c index 09004d9b6bd7..c727521eb727 100644 --- a/sound/soc/rockchip/rockchip_asrc.c +++ b/sound/soc/rockchip/rockchip_asrc.c @@ -1269,7 +1269,7 @@ static struct clk *rockchip_asrc_get_clk_parent(struct clk *clk, char *clk_names name_len = strlen(name); if ((name_len > 1) && (name[name_len - 1] == '0') && - (name[name_len - 2] < '0' && name[name_len - 2] > '9')) { + (name[name_len - 2] < '0' || name[name_len - 2] > '9')) { name_temp = kstrdup(name, GFP_KERNEL); if (!name_temp) return ERR_PTR(-ENOMEM);