[PATCH] ASoC: loongson: remove redundant variable assignments

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



In the function loongson_asoc_card_probe, it is simpler
to return the value of function devm_snd_soc_register_card
directly.

Signed-off-by: Tang Bin <tangbin@xxxxxxxxxxxxxxxxxxxx>
---
 sound/soc/loongson/loongson_card.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sound/soc/loongson/loongson_card.c b/sound/soc/loongson/loongson_card.c
index fae5e9312..98a03ef82 100644
--- a/sound/soc/loongson/loongson_card.c
+++ b/sound/soc/loongson/loongson_card.c
@@ -192,9 +192,7 @@ static int loongson_asoc_card_probe(struct platform_device *pdev)
 	if (ret < 0)
 		return ret;
 
-	ret = devm_snd_soc_register_card(&pdev->dev, card);
-
-	return ret;
+	return devm_snd_soc_register_card(&pdev->dev, card);
 }
 
 static const struct of_device_id loongson_asoc_dt_ids[] = {
-- 
2.33.0







[Index of Archives]     [Pulseaudio]     [Linux Audio Users]     [ALSA Devel]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux