[PATCH] ASoC: loongson: remove redundant variable assignments

From: Tang Bin
Date: Fri Sep 06 2024 - 06:07:18 EST


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