From patchwork Thu Dec 11 17:45:41 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Sylwester Nawrocki/Kernel \\(PLT\\) /SRPOL/Staff Engineer/Samsung Electronics" X-Patchwork-Id: 5476951 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id AF9B49F1D4 for ; Thu, 11 Dec 2014 17:48:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DE0B4201BB for ; Thu, 11 Dec 2014 17:48:21 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 96B4920160 for ; Thu, 11 Dec 2014 17:48:20 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 77A02265626; Thu, 11 Dec 2014 18:48:19 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,NO_DNS_FOR_FROM, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 111F62652E1; Thu, 11 Dec 2014 18:46:42 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id E37C426527E; Thu, 11 Dec 2014 18:46:38 +0100 (CET) Received: from mailout4.samsung.com (mailout4.samsung.com [203.254.224.34]) by alsa0.perex.cz (Postfix) with ESMTP id 4C55B2605F1 for ; Thu, 11 Dec 2014 18:46:33 +0100 (CET) Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NGF00GCMIPKI090@mailout4.samsung.com> for alsa-devel@alsa-project.org; Fri, 12 Dec 2014 02:46:32 +0900 (KST) X-AuditID: cbfee61a-f79c06d000004e71-ba-5489d87805ab Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id E1.D0.20081.878D9845; Fri, 12 Dec 2014 02:46:32 +0900 (KST) Received: from amdc1344.digital.local ([106.116.147.32]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0NGF00MHSIP1T280@mmp1.samsung.com>; Fri, 12 Dec 2014 02:46:32 +0900 (KST) From: Sylwester Nawrocki To: alsa-devel@alsa-project.org, linux-samsung-soc@vger.kernel.org Date: Thu, 11 Dec 2014 18:45:41 +0100 Message-id: <1418319952-10163-4-git-send-email-s.nawrocki@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1418319952-10163-1-git-send-email-s.nawrocki@samsung.com> References: <1418319952-10163-1-git-send-email-s.nawrocki@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprMLMWRmVeSWpSXmKPExsVy+t9jAd2KG50hBge3cFlcuXiIyWLqwyds Fo/mP2a2mHF+H5PF75vf2SwOv2lntbi44guTA7vHhs9NbB6Lvmd5bFrVyebRt2UVo8fnTXIB rFFcNimpOZllqUX6dglcGXub2pgKHnJWbHr6gL2BsYuji5GTQ0LARKKn+xgzhC0mceHeerYu Ri4OIYFFjBINH/qZIJwOJokJX3+wg1SxCRhK9B7tYwSxRQScJGbOeQ/WwSzQzChx/tcNJpCE sECwxOdvv1hAbBYBVYn2hYfB4rwCbhJzlp4DsjmA1ilIzJlkAxLmFHCXWP/rHFi5EFDJo40N rBMYeRcwMqxiFE0tSC4oTkrPNdQrTswtLs1L10vOz93ECA6qZ1I7GFc2WBxiFOBgVOLhzYjv DBFiTSwrrsw9xCjBwawkwrvnMlCINyWxsiq1KD++qDQntfgQozQHi5I4r5J9W4iQQHpiSWp2 ampBahFMlomDU6qBce6cD5/rc75d3Wiq9WPnhxcc1/bPXa6V8vfT8bmLd/juCm9KuKLFsVgx d656ncjxtafYpjskTLhZaB+SYzSvhm/CGYMajpzzzfflD+jNdNgseZVdfHbImv+2RbJ3P84x 2vUmdqpS4IqK3Q/emycpiIYaduQ1Lnc1YZF9+/LXU9Gs9M099aubXiqxFGckGmoxFxUnAgAq 9+Y/JgIAAA== Cc: sbkim73@samsung.com, broonie@kernel.org, drake@endlessm.com, Sylwester Nawrocki , padma.v@samsung.com Subject: [alsa-devel] [PATCH/RFC 03/14] ASoC: samsung: i2s: Add return value checks in probe() X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP Those function may fail so let's report properly any errors. Signed-off-by: Sylwester Nawrocki --- sound/soc/samsung/i2s.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c index 45f7f0f..d65e092 100644 --- a/sound/soc/samsung/i2s.c +++ b/sound/soc/samsung/i2s.c @@ -1173,11 +1173,13 @@ static int samsung_i2s_probe(struct platform_device *pdev) dev_err(&pdev->dev, "Unable to get drvdata\n"); return -EFAULT; } - devm_snd_soc_register_component(&sec_dai->pdev->dev, + ret = devm_snd_soc_register_component(&sec_dai->pdev->dev, &samsung_i2s_component, &sec_dai->i2s_dai_drv, 1); - samsung_asoc_dma_platform_register(&pdev->dev); - return 0; + if (ret != 0) + return ret; + + return samsung_asoc_dma_platform_register(&pdev->dev); } pri_dai = i2s_alloc_dai(pdev, false); @@ -1290,7 +1292,9 @@ static int samsung_i2s_probe(struct platform_device *pdev) pm_runtime_enable(&pdev->dev); - samsung_asoc_dma_platform_register(&pdev->dev); + ret = samsung_asoc_dma_platform_register(&pdev->dev); + if (ret != 0) + return ret; return 0; err: