From 046993ac20b70c059f1fcfe8a77a7d1b5cd12f2c Mon Sep 17 00:00:00 2001 From: XiaoTan Luo Date: Wed, 15 Jun 2022 18:13:41 +0800 Subject: [PATCH] ASoC: rockchip: multicodecs: remove MAX_CODECS a soundcard can connected more than 2 codecs. Signed-off-by: XiaoTan Luo Change-Id: Ie42d54e33c1be58582350ec24165d5310347b4d2 --- sound/soc/rockchip/rockchip_multicodecs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/rockchip/rockchip_multicodecs.c b/sound/soc/rockchip/rockchip_multicodecs.c index 9486a2e5db2d..cd1130f6e3cb 100644 --- a/sound/soc/rockchip/rockchip_multicodecs.c +++ b/sound/soc/rockchip/rockchip_multicodecs.c @@ -39,7 +39,6 @@ #include #define DRV_NAME "rk-multicodecs" -#define MAX_CODECS 2 #define WAIT_CARDS (SNDRV_CARDS - 1) #define DEFAULT_MCLK_FS 256 @@ -620,7 +619,7 @@ static int rk_multicodecs_probe(struct platform_device *pdev) card->num_aux_devs = 0; count = of_count_phandle_with_args(np, "rockchip,codec", NULL); - if (count < 0 || count > MAX_CODECS) + if (count < 0) return -EINVAL; /* refine codecs, remove unavailable node */