From patchwork Wed Jan 14 18:42:29 2015 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: 5634541 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 6CA81C058D for ; Wed, 14 Jan 2015 18:44:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A583D201B9 for ; Wed, 14 Jan 2015 18:44:55 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 7BE982012E for ; Wed, 14 Jan 2015 18:44:54 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 9E99D2654B0; Wed, 14 Jan 2015 19:44:53 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 81C2626532C; Wed, 14 Jan 2015 19:43:51 +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 D44BD26535F; Wed, 14 Jan 2015 19:43:49 +0100 (CET) Received: from mailout4.samsung.com (mailout4.samsung.com [203.254.224.34]) by alsa0.perex.cz (Postfix) with ESMTP id AA01B261B0A for ; Wed, 14 Jan 2015 19:43:14 +0100 (CET) Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NI6006SYK00O220@mailout4.samsung.com> for alsa-devel@alsa-project.org; Thu, 15 Jan 2015 03:43:12 +0900 (KST) X-AuditID: cbfee61b-f79d76d0000024d6-93-54b6b8c04344 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id DE.58.09430.0C8B6B45; Thu, 15 Jan 2015 03:43:12 +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 <0NI600JMDJZE6P20@mmp1.samsung.com>; Thu, 15 Jan 2015 03:43:12 +0900 (KST) From: Sylwester Nawrocki To: broonie@kernel.org, kgene@kernel.org Date: Wed, 14 Jan 2015 19:42:29 +0100 Message-id: <1421260962-16892-3-git-send-email-s.nawrocki@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1421260962-16892-1-git-send-email-s.nawrocki@samsung.com> References: <1421260962-16892-1-git-send-email-s.nawrocki@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrGLMWRmVeSWpSXmKPExsVy+t9jAd0DO7aFGCx9qWxx5eIhJoupD5+w Wcw/co7V4tH8x8wW/Y9fM1tsenyN1WLG+X1MFr9vfmezOPymndXi4oovTA5cHhs+N7F5LPqe 5bFpVSebx+Yl9R59W1YxenzeJBfAFsVlk5Kak1mWWqRvl8CV8XHSTMaCR5wVDZ0zWRoYuzm6 GDk5JARMJO49mccOYYtJXLi3nq2LkYtDSGARo8S/b19YIZwOJonZJ5+zglSxCRhK9B7tYwSx RQQ0JLZsfMsEUsQs8JVR4v/UXhaQhLBAgMShBd1gNouAqsTC/WfBGngF3CT+dTwGWsEBtE5B Ys4kG5Awp4C7xOVzd5lAbCGgkveXvrNOYORdwMiwilE0tSC5oDgpPddIrzgxt7g0L10vOT93 EyM49J5J72Bc1WBxiFGAg1GJh9fhyNYQIdbEsuLK3EOMEhzMSiK8q7ZsCxHiTUmsrEotyo8v Ks1JLT7EKM3BoiTOq2TfFiIkkJ5YkpqdmlqQWgSTZeLglGpgXPZupcjvg0aqp9b9v+CRs0h3 38Hvs6byycT01U62v6uyZUvUOZu4SN234gxCDsejYjZemsuXs/BQzBc/31NXjlVuqTLtKFcL 2nZWTqc7ekfm+hd1n3bplCjc0lW2XWTU4DybR8Zywebpyrs8bXV/JtbW+3w8XZa/KUDx/aR+ 2X2KXybNzjBTVGIpzkg01GIuKk4EAN9ygCY5AgAA Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org, linux-samsung-soc@vger.kernel.org, padma.v@samsung.com, sbkim73@samsung.com, drake@endlessm.com, Sylwester Nawrocki , linux-arm-kernel@lists.infradead.org Subject: [alsa-devel] [PATCH V3 02/15] 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 These functions may fail so let's properly report 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 e5473ee..aa52b41 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: