[{"id":1772712,"web_url":"http://patchwork.ozlabs.org/comment/1772712/","msgid":"<2fcb7f93-0449-118a-aa8d-4de51ee39895@ti.com>","date":"2017-09-21T11:11:54","subject":"Re: [PATCH 1/3] ASoC: davinci-mcasp: Handle return value of\n\tdevm_kasprintf","submitter":{"id":9142,"url":"http://patchwork.ozlabs.org/api/people/9142/","name":"Peter Ujfalusi","email":"peter.ujfalusi@ti.com"},"content":"﻿\nTexas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki\n\nOn 2017-09-20 13:06, Arvind Yadav wrote:\n> devm_kasprintf() can fail here and we must check its return value.\n\nAcked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>\n\n> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>\n> ---\n>  sound/soc/davinci/davinci-mcasp.c | 12 ++++++++++++\n>  1 file changed, 12 insertions(+)\n> \n> diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c\n> index f395bbc..d1a4aa2 100644\n> --- a/sound/soc/davinci/davinci-mcasp.c\n> +++ b/sound/soc/davinci/davinci-mcasp.c\n> @@ -1867,6 +1867,10 @@ static int davinci_mcasp_probe(struct platform_device *pdev)\n>  \tif (irq >= 0) {\n>  \t\tirq_name = devm_kasprintf(&pdev->dev, GFP_KERNEL, \"%s_common\",\n>  \t\t\t\t\t  dev_name(&pdev->dev));\n> +\t\tif (!irq_name) {\n> +\t\t\tret = -ENOMEM;\n> +\t\t\tgoto err;\n> +\t\t}\n>  \t\tret = devm_request_threaded_irq(&pdev->dev, irq, NULL,\n>  \t\t\t\t\t\tdavinci_mcasp_common_irq_handler,\n>  \t\t\t\t\t\tIRQF_ONESHOT | IRQF_SHARED,\n> @@ -1884,6 +1888,10 @@ static int davinci_mcasp_probe(struct platform_device *pdev)\n>  \tif (irq >= 0) {\n>  \t\tirq_name = devm_kasprintf(&pdev->dev, GFP_KERNEL, \"%s_rx\",\n>  \t\t\t\t\t  dev_name(&pdev->dev));\n> +\t\tif (!irq_name) {\n> +\t\t\tret = -ENOMEM;\n> +\t\t\tgoto err;\n> +\t\t}\n>  \t\tret = devm_request_threaded_irq(&pdev->dev, irq, NULL,\n>  \t\t\t\t\t\tdavinci_mcasp_rx_irq_handler,\n>  \t\t\t\t\t\tIRQF_ONESHOT, irq_name, mcasp);\n> @@ -1899,6 +1907,10 @@ static int davinci_mcasp_probe(struct platform_device *pdev)\n>  \tif (irq >= 0) {\n>  \t\tirq_name = devm_kasprintf(&pdev->dev, GFP_KERNEL, \"%s_tx\",\n>  \t\t\t\t\t  dev_name(&pdev->dev));\n> +\t\tif (!irq_name) {\n> +\t\t\tret = -ENOMEM;\n> +\t\t\tgoto err;\n> +\t\t}\n>  \t\tret = devm_request_threaded_irq(&pdev->dev, irq, NULL,\n>  \t\t\t\t\t\tdavinci_mcasp_tx_irq_handler,\n>  \t\t\t\t\t\tIRQF_ONESHOT, irq_name, mcasp);\n> \n\n- Péter","headers":{"Return-Path":"<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>","X-Original-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Delivered-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xyZ2f0kXCz9t3v\n\tfor <patchwork-incoming@ozlabs.org>;\n\tThu, 21 Sep 2017 21:22:18 +1000 (AEST)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xyZ2d6j23zDrCb\n\tfor <patchwork-incoming@ozlabs.org>;\n\tThu, 21 Sep 2017 21:22:17 +1000 (AEST)","from lelnx193.ext.ti.com (lelnx193.ext.ti.com [198.47.27.77])\n\t(using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3xyZ0v2RgBzDqT0\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tThu, 21 Sep 2017 21:20:46 +1000 (AEST)","from dflxv15.itg.ti.com ([128.247.5.124])\n\tby lelnx193.ext.ti.com (8.15.1/8.15.1) with ESMTP id v8LBBpNL026100; \n\tThu, 21 Sep 2017 06:11:51 -0500","from DLEE100.ent.ti.com (dlee100.ent.ti.com [157.170.170.30])\n\tby dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id v8LBBp5J030459;\n\tThu, 21 Sep 2017 06:11:51 -0500","from DLEE105.ent.ti.com (157.170.170.35) by DLEE100.ent.ti.com\n\t(157.170.170.30) with Microsoft SMTP Server (version=TLS1_2,\n\tcipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.845.34;\n\tThu, 21 Sep 2017 06:11:51 -0500","from dlep33.itg.ti.com (157.170.170.75) by DLEE105.ent.ti.com\n\t(157.170.170.35) with Microsoft SMTP Server (version=TLS1_0,\n\tcipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.845.34 via Frontend\n\tTransport; Thu, 21 Sep 2017 06:11:51 -0500","from [192.168.2.6] (ileax41-snat.itg.ti.com [10.172.224.153])\n\tby dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id v8LBBm86024022;\n\tThu, 21 Sep 2017 06:11:48 -0500"],"Authentication-Results":["ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ti.com header.i=@ti.com header.b=\"rN17y9ka\";\n\tdkim-atps=neutral","lists.ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ti.com header.i=@ti.com header.b=\"rN17y9ka\";\n\tdkim-atps=neutral","ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=ti.com\n\t(client-ip=198.47.27.77; helo=lelnx193.ext.ti.com;\n\tenvelope-from=peter.ujfalusi@ti.com; receiver=<UNKNOWN>)","lists.ozlabs.org; dkim=pass (1024-bit key;\n\tunprotected) header.d=ti.com header.i=@ti.com header.b=\"rN17y9ka\"; \n\tdkim-atps=neutral"],"X-Greylist":"delayed 525 seconds by postgrey-1.36 at bilbo;\n\tThu, 21 Sep 2017 21:20:47 AEST","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com;\n\ts=ti-com-17Q1; t=1505992312;\n\tbh=Yqh73JUiSOOKnO7gwhlqipt/Cu8g6KIF0eZqN/A1nrA=;\n\th=Subject:To:References:CC:From:Date:In-Reply-To;\n\tb=rN17y9kax/I2jViaQIn4llizB7DE7ERpFWVjzUnoHSsNkgwY6ai5IwPW/VCBN94X5\n\ta0h+eEmXsUnP6d4xQpbPhdRzphWpkSaOmK31T2ymWfsfVe/AFSmXp40pzfumw2y6Rx\n\taYVWWNmzScsxT6dIp2JnW+IWKa6nrLkcz9FjN4fM=","Subject":"Re: [PATCH 1/3] ASoC: davinci-mcasp: Handle return value of\n\tdevm_kasprintf","To":"Arvind Yadav <arvind.yadav.cs@gmail.com>, <lgirdwood@gmail.com>,\n\t<broonie@kernel.org>, <perex@perex.cz>, <tiwai@suse.com>,\n\t<timur@tabi.org>, <nicoleotsuka@gmail.com>, <Xiubo.Lee@gmail.com>,\n\t<fabio.estevam@nxp.com>, <alsa-devel@alsa-project.org>,\n\t<linux-kernel@vger.kernel.org>","References":"<1505901971-12004-1-git-send-email-arvind.yadav.cs@gmail.com>\n\t<1505901971-12004-2-git-send-email-arvind.yadav.cs@gmail.com>","From":"Peter Ujfalusi <peter.ujfalusi@ti.com>","Message-ID":"<2fcb7f93-0449-118a-aa8d-4de51ee39895@ti.com>","Date":"Thu, 21 Sep 2017 14:11:54 +0300","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101\n\tThunderbird/45.8.0","MIME-Version":"1.0","In-Reply-To":"<1505901971-12004-2-git-send-email-arvind.yadav.cs@gmail.com>","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"quoted-printable","X-EXCLAIMER-MD-CONFIG":"e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180","X-BeenThere":"linuxppc-dev@lists.ozlabs.org","X-Mailman-Version":"2.1.24","Precedence":"list","List-Id":"Linux on PowerPC Developers Mail List\n\t<linuxppc-dev.lists.ozlabs.org>","List-Unsubscribe":"<https://lists.ozlabs.org/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe>","List-Archive":"<http://lists.ozlabs.org/pipermail/linuxppc-dev/>","List-Post":"<mailto:linuxppc-dev@lists.ozlabs.org>","List-Help":"<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help>","List-Subscribe":"<https://lists.ozlabs.org/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe>","Cc":"linux-omap@vger.kernel.org, linuxppc-dev@lists.ozlabs.org","Errors-To":"linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org","Sender":"\"Linuxppc-dev\"\n\t<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>"}}]