From patchwork Thu Nov 23 17:32:40 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: 10073263 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 96B3760375 for ; Thu, 23 Nov 2017 19:13:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8717929F22 for ; Thu, 23 Nov 2017 19:13:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7A88629F54; Thu, 23 Nov 2017 19:13:54 +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 2ED6F29F22 for ; Thu, 23 Nov 2017 19:13:52 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id AF78826795C; Thu, 23 Nov 2017 20:13:47 +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 22E01267944; Thu, 23 Nov 2017 20:13:44 +0100 (CET) Received: from mout.web.de (mout.web.de [212.227.15.14]) by alsa0.perex.cz (Postfix) with ESMTP id 809DA267958 for ; Thu, 23 Nov 2017 18:32:50 +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 0MX0q4-1ecwHO37tU-00W1tQ; Thu, 23 Nov 2017 18:32:43 +0100 From: SF Markus Elfring To: alsa-devel@alsa-project.org, support.opensource@diasemi.com, Jaroslav Kysela , Liam Girdwood , Mark Brown , Takashi Iwai References: Message-ID: <6dc71b14-4c14-82f6-9dad-92bfa9854de2@users.sourceforge.net> Date: Thu, 23 Nov 2017 18:32:40 +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:4NxkLWDizrwrzxKHzqakesaiKDbWexVCNliimJdtPawRQpy1PO/ DiNoiiYprj0Aus9O/kCcyYMEZKfuLwuk/mFlIT5hmeJKaieCtwbHrhrQcdW1JJjQ2uLesEM hJtu7XBU9T7wJIX5jvfsEfZeAMRXQBGx7pkoiFb4q4VYJWNZ94ey/or6KRIhJQBMauJI0sy XpKIdNmTcGdtvLJ40egbA== X-UI-Out-Filterresults: notjunk:1; V01:K0:kcIqnN1Fdto=:jK3CHoYR78UVmKHn9yK2bf Ca0SwEZ1KWkIqedeEKI942EB+Ms31OV87X7xKLEZ89tsPqQQLL8oRDQ6ZeIrTFLbaq35cw2N7 dyBjKq80/HBcCHxB5rUxxOCY5IDTbKjSZEe6uC/Nh1cQ0zFYCOKfW2fkT97gd3JRDK4h9CAGO hnu+YOdAV3L+tuh879YObbseOED0x4NsGyDuotaMRZTqLxfCYKQAZe8rcVC02zK7Ts8OX2DDF Jfd0hSmBFz7SVxrR6OkbBj5s2k2PWfFviY1dUWVwItY5o9TNiB3Ij55MrWIOjEa2qeajlRLah NaP97fK0WT8IXFnnCDxImok1vKQQSrF8DdYKMyr7kP7xDzb4ckLT/afmoM5NQNb8kScZWUqNi KDN74dg8QozSc90cDH/OwhqPGemaaKyZfh1I/IRl+FYsw1vLQSSrqNKFMY2QDBEDkV+tx0EuW cGQkt7Gr38OfolEPlShLBl5Cgqrd2Fd01lsYnVOpsjZuJfSzhk697dzeEDeycARQxPda3X5WX el40SXYnt02TVXrFVW93r9MhcxrnbSOy3Gi5Hd14THSvPr8JTxqCnasCOjn3ojsFoVAEUv+oy dnM71vS62j/7ab8+rCzhNpv0Pvppu5Zs8dQSQl2HMqurEoE9SNE/Of4fUKsxUWAbIqgg8zfjK clitgTCIGexxRH+QaioplRBTrtw3+oGTtzKISupxcD4QB5QLbaWYtK76KxFxT7DbWm83pV9q5 jqIas7rnmErc11KzWiyX5R5LlOlFEJJb6jtndlOstjdln2w6qGJL53SqaZxXFcQbEhcTax2Qd z1x9ysDGyfJq4TzxAifiM9cmQ4+wrlBmS6gK2LJzn4DvB/wty4= Cc: kernel-janitors@vger.kernel.org, LKML Subject: [alsa-devel] [PATCH 1/2] ASoC: da7213: Delete an error message for a failed memory allocation in da7213_fw_to_pdata() 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 17:56:54 +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 Acked-by: Adam Thomson --- sound/soc/codecs/da7213.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sound/soc/codecs/da7213.c b/sound/soc/codecs/da7213.c index 41d9b1da27c2..d1b77a0e3b74 100644 --- a/sound/soc/codecs/da7213.c +++ b/sound/soc/codecs/da7213.c @@ -1654,10 +1654,8 @@ static struct da7213_platform_data u32 fw_val32; pdata = devm_kzalloc(codec->dev, sizeof(*pdata), GFP_KERNEL); - if (!pdata) { - dev_warn(codec->dev, "Failed to allocate memory for pdata\n"); + if (!pdata) return NULL; - } if (device_property_read_u32(dev, "dlg,micbias1-lvl", &fw_val32) >= 0) pdata->micbias1_lvl = da7213_of_micbias_lvl(codec, fw_val32);