[PATCH] ASoC: topology: KUnit: Followup prototype change of snd_soc_unregister_card()

Uwe Kleine-König u.kleine-koenig at pengutronix.de
Wed Jun 22 14:06:29 PDT 2022


snd_soc_unregister_card() was recently converted to return void. Only
the first instance was adapted, so convert the remaining ones now to fix
building the topology test.

Reported-by: kernel test robot <lkp at intel.com>
Fixes: 1892a991886a ("ASoC: core: Make snd_soc_unregister_card() return void")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig at pengutronix.de>
---
Hello Mark,

this fixes the issue the kernel test robot has reported in reply to the
patch that became 1892a991886a.

Up to you to apply on top of 1892a991886a or squash them together.

I'm a bit surprised that sound/soc/soc-topology-test.c isn't built for
ARCH=arm allmodconfig (that was my build test and that's the reason I
didn't notice the issue before submission of my change). I didn't look
into that though.

Best regards
Uwe

 sound/soc/soc-topology-test.c | 30 ++++++++++--------------------
 1 file changed, 10 insertions(+), 20 deletions(-)

diff --git a/sound/soc/soc-topology-test.c b/sound/soc/soc-topology-test.c
index 225d74355974..51d650bb05b7 100644
--- a/sound/soc/soc-topology-test.c
+++ b/sound/soc/soc-topology-test.c
@@ -313,8 +313,7 @@ static void snd_soc_tplg_test_load_with_null_ops(struct kunit *test)
 	KUNIT_EXPECT_EQ(test, 0, ret);
 
 	/* cleanup */
-	ret = snd_soc_unregister_card(&kunit_comp->card);
-	KUNIT_EXPECT_EQ(test, 0, ret);
+	snd_soc_unregister_card(&kunit_comp->card);
 
 	snd_soc_unregister_component(test_dev);
 }
@@ -377,8 +376,7 @@ static void snd_soc_tplg_test_load_with_null_fw(struct kunit *test)
 	KUNIT_EXPECT_EQ(test, 0, ret);
 
 	/* cleanup */
-	ret = snd_soc_unregister_card(&kunit_comp->card);
-	KUNIT_EXPECT_EQ(test, 0, ret);
+	snd_soc_unregister_card(&kunit_comp->card);
 
 	snd_soc_unregister_component(test_dev);
 }
@@ -426,8 +424,7 @@ static void snd_soc_tplg_test_load_empty_tplg(struct kunit *test)
 	KUNIT_EXPECT_EQ(test, 0, ret);
 
 	/* cleanup */
-	ret = snd_soc_unregister_card(&kunit_comp->card);
-	KUNIT_EXPECT_EQ(test, 0, ret);
+	snd_soc_unregister_card(&kunit_comp->card);
 
 	snd_soc_unregister_component(test_dev);
 }
@@ -482,8 +479,7 @@ static void snd_soc_tplg_test_load_empty_tplg_bad_magic(struct kunit *test)
 	KUNIT_EXPECT_EQ(test, 0, ret);
 
 	/* cleanup */
-	ret = snd_soc_unregister_card(&kunit_comp->card);
-	KUNIT_EXPECT_EQ(test, 0, ret);
+	snd_soc_unregister_card(&kunit_comp->card);
 
 	snd_soc_unregister_component(test_dev);
 }
@@ -538,8 +534,7 @@ static void snd_soc_tplg_test_load_empty_tplg_bad_abi(struct kunit *test)
 	KUNIT_EXPECT_EQ(test, 0, ret);
 
 	/* cleanup */
-	ret = snd_soc_unregister_card(&kunit_comp->card);
-	KUNIT_EXPECT_EQ(test, 0, ret);
+	snd_soc_unregister_card(&kunit_comp->card);
 
 	snd_soc_unregister_component(test_dev);
 }
@@ -594,8 +589,7 @@ static void snd_soc_tplg_test_load_empty_tplg_bad_size(struct kunit *test)
 	KUNIT_EXPECT_EQ(test, 0, ret);
 
 	/* cleanup */
-	ret = snd_soc_unregister_card(&kunit_comp->card);
-	KUNIT_EXPECT_EQ(test, 0, ret);
+	snd_soc_unregister_card(&kunit_comp->card);
 
 	snd_soc_unregister_component(test_dev);
 }
@@ -653,8 +647,7 @@ static void snd_soc_tplg_test_load_empty_tplg_bad_payload_size(struct kunit *tes
 	/* cleanup */
 	snd_soc_unregister_component(test_dev);
 
-	ret = snd_soc_unregister_card(&kunit_comp->card);
-	KUNIT_EXPECT_EQ(test, 0, ret);
+	snd_soc_unregister_card(&kunit_comp->card);
 }
 
 // TEST CASE
@@ -702,8 +695,7 @@ static void snd_soc_tplg_test_load_pcm_tplg(struct kunit *test)
 	snd_soc_unregister_component(test_dev);
 
 	/* cleanup */
-	ret = snd_soc_unregister_card(&kunit_comp->card);
-	KUNIT_EXPECT_EQ(test, 0, ret);
+	snd_soc_unregister_card(&kunit_comp->card);
 }
 
 // TEST CASE
@@ -755,8 +747,7 @@ static void snd_soc_tplg_test_load_pcm_tplg_reload_comp(struct kunit *test)
 	}
 
 	/* cleanup */
-	ret = snd_soc_unregister_card(&kunit_comp->card);
-	KUNIT_EXPECT_EQ(test, 0, ret);
+	snd_soc_unregister_card(&kunit_comp->card);
 }
 
 // TEST CASE
@@ -804,8 +795,7 @@ static void snd_soc_tplg_test_load_pcm_tplg_reload_card(struct kunit *test)
 		if (ret != 0 && ret != -EPROBE_DEFER)
 			KUNIT_FAIL(test, "Failed to register card");
 
-		ret = snd_soc_unregister_card(&kunit_comp->card);
-		KUNIT_EXPECT_EQ(test, 0, ret);
+		snd_soc_unregister_card(&kunit_comp->card);
 	}
 
 	/* cleanup */

base-commit: 1892a991886ace2c3450bec801df2cf4028a803a
-- 
2.36.1



More information about the linux-arm-kernel mailing list