[alsa-devel] [PATCH v2 05/10] ASoC: rockchip: Remove unnecessary function call

Peng Donglin dolinux.peng at gmail.com
Wed Aug 23 14:20:06 CEST 2017


The work of the function platform_set_drvdata is done by
devm_snd_soc_register_card.

Signed-off-by: Peng Donglin <dolinux.peng at gmail.com>
---
 sound/soc/rockchip/rk3288_hdmi_analog.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/sound/soc/rockchip/rk3288_hdmi_analog.c b/sound/soc/rockchip/rk3288_hdmi_analog.c
index dbc53e48c52c..cf5bbd8b6ebc 100644
--- a/sound/soc/rockchip/rk3288_hdmi_analog.c
+++ b/sound/soc/rockchip/rk3288_hdmi_analog.c
@@ -266,13 +266,9 @@ static int snd_rk_mc_probe(struct platform_device *pdev)
 	ret = devm_snd_soc_register_card(&pdev->dev, card);
 	if (ret == -EPROBE_DEFER)
 		return -EPROBE_DEFER;
-	if (ret) {
+	if (ret)
 		dev_err(&pdev->dev,
 			"Soc register card failed %d\n", ret);
-		return ret;
-	}
-
-	platform_set_drvdata(pdev, card);
 
 	return ret;
 }
-- 
2.14.1



More information about the Alsa-devel mailing list