From patchwork Thu Nov 23 08:44:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 10072525 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id ECB7A6056E for ; Thu, 23 Nov 2017 08:53:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CBC6029D8D for ; Thu, 23 Nov 2017 08:53:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BC34729EFA; Thu, 23 Nov 2017 08:53:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E906529D8D for ; Thu, 23 Nov 2017 08:52:59 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 9A4E32672B4; Thu, 23 Nov 2017 09:44:19 +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 24DF52672B6; Thu, 23 Nov 2017 09:44:18 +0100 (CET) Received: from mout.web.de (mout.web.de [212.227.15.14]) by alsa0.perex.cz (Postfix) with ESMTP id 83C0B267295 for ; Thu, 23 Nov 2017 09:44:16 +0100 (CET) Received: from [192.168.1.3] ([92.224.135.232]) by smtp.web.de (mrweb002 [213.165.67.108]) with ESMTPSA (Nemesis) id 0McnaL-1eZjbb064n-00Hxbo; Thu, 23 Nov 2017 09:44:06 +0100 From: SF Markus Elfring To: alsa-devel@alsa-project.org, Brian Austin , Jaroslav Kysela , Liam Girdwood , Mark Brown , Paul Handrigan , Takashi Iwai References: Message-ID: <23adac87-3c2b-a264-348a-aaf7cbba5420@users.sourceforge.net> Date: Thu, 23 Nov 2017 09:44:03 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-GB X-Provags-ID: V03:K0:IbdiwnLbA5hpPkMj9/Qp9ZAjFqUqFnj67eZCXA7JTZAltP01xUh Y8q9tM2HTNcpqFiKbhTt9sDgBvH9H1MTi2/wys+EH2By4UNoYm/Kz7U3MUHsOJuVBwShRo/ OO7ZRCqA30QXsvBA2Ul6/9fOfv0yABOiP/Kyxz9U3nFdpWggZKDkhG0ChnixOv2u5csGqgF yRAKHWstE7hsVGrumCrJQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:XBcg84K5hAo=:Bh3FGLmBXVpwLbhppCYG4k V5MoIUE8Vn4OH0opBiw2u/1lF96Tl4NjhXgfs52aQSGSv+VyNCGBoyttqutVYbXTB4rPSmfSK BATV48pxvcSbhkuFKpGvx0QzWCVeVRFNpyNtyIZsmub0JJZGPoIWx+EBP7RuBMACNZN0Gt1/n pOSJhPJPnbbb7cYvZTv3afmlqhHeP+loYcAGdu0flP9APqJTVrP1evSHAbNdIQ1eOXayg+Vbl obt5q6CeaCq/fRMTCdWLxP9bVrfCL8WNs1OiU+vU3wYlIeVXlzqViSzWhFpDN6wJGOBpv0jCi 832NFlHlQYTpPPZRMcO4H08HG5ysw9X/GQhCAls9h6OUpmJOM7WD9fy0HU9gFBTjvo5PUI2h6 W2UKvEPVqtqcJqGcdvHWpLaH5QWJUmRbNQaB5/QcJSLAvNSrDcSr200btbzW6Z8mE/eqjU7vx VqwDTEXboSXErLwwsVjkq/8sYwW5lpsrl1rOjbN+cWGGxMMOkpxXCWJASBUSnQu5RHZDXjqGC GD/RSgs9Tl0oSEj8EiJkaLl4OeR0TFF+l6WIv5c58yBD7OdFxvvXeHxK7F5NgivBkHbv2kp+K DscykDeD7mgrV3gU4I92iEa9uNfYeTI7CfazcadZkE/qVj/ciSu6VyyXrhoRnZuecfJ2jnbDD nCrBZ8SDa7oMduTygeVoZIsT/c3aXMxDgk5GJV0a5GHB4KKbVc8iPaMtKz5e3/lJrBblOYAPI pwjBA1dz5iI0NeKMFUoq11TdEnT4SerYycinJ+zT7Mwqp0h4ztvoRJ0RwAi5kSg5VsoGMwWlt AjqYfZmP7PhEijPWA5ulysqfvYsoHyC6WUIRFuBH3dMjpPgF8c= Cc: kernel-janitors@vger.kernel.org, LKML Subject: [alsa-devel] [PATCH 1/2] ASoC: cs42l56: Delete an error message for a failed memory allocation in cs42l56_i2c_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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring Date: Thu, 23 Nov 2017 09:26:08 +0100 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- sound/soc/codecs/cs42l56.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/cs42l56.c b/sound/soc/codecs/cs42l56.c index cb6ca85f1536..13ee46217d78 100644 --- a/sound/soc/codecs/cs42l56.c +++ b/sound/soc/codecs/cs42l56.c @@ -1210,11 +1210,9 @@ static int cs42l56_i2c_probe(struct i2c_client *i2c_client, pdata = devm_kzalloc(&i2c_client->dev, sizeof(struct cs42l56_platform_data), GFP_KERNEL); - if (!pdata) { - dev_err(&i2c_client->dev, - "could not allocate pdata\n"); + if (!pdata) return -ENOMEM; - } + if (i2c_client->dev.of_node) { ret = cs42l56_handle_of_data(i2c_client, &cs42l56->pdata);