Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754164AbdHWMUh (ORCPT ); Wed, 23 Aug 2017 08:20:37 -0400 Received: from mail-pg0-f66.google.com ([74.125.83.66]:38454 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753904AbdHWMUg (ORCPT ); Wed, 23 Aug 2017 08:20:36 -0400 From: Peng Donglin To: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Cc: broonie@kernel.org, perex@perex.cz, tiwai@suse.com, Peng Donglin Subject: [PATCH v2 06/10] ASoC: mxs-sgtl5000: Remove unnecessary function call Date: Wed, 23 Aug 2017 05:20:30 -0700 Message-Id: X-Mailer: git-send-email 2.14.1 In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 845 Lines: 33 The work of the function platform_set_drvdata is done by devm_snd_soc_register_card. Signed-off-by: Peng Donglin --- sound/soc/mxs/mxs-sgtl5000.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/sound/soc/mxs/mxs-sgtl5000.c b/sound/soc/mxs/mxs-sgtl5000.c index a96276e77332..90ca6f9131a1 100644 --- a/sound/soc/mxs/mxs-sgtl5000.c +++ b/sound/soc/mxs/mxs-sgtl5000.c @@ -140,16 +140,13 @@ static int mxs_sgtl5000_probe(struct platform_device *pdev) } card->dev = &pdev->dev; - platform_set_drvdata(pdev, card); ret = devm_snd_soc_register_card(&pdev->dev, card); - if (ret) { + if (ret) dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n", ret); - return ret; - } - return 0; + return ret; } static int mxs_sgtl5000_remove(struct platform_device *pdev) -- 2.14.1