From patchwork Thu May 30 23:06:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 10969327 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DEA2A13AD for ; Thu, 30 May 2019 23:07:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C9C951FFE4 for ; Thu, 30 May 2019 23:07:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BA0B028B7A; Thu, 30 May 2019 23:07:13 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6D5F31FFE4 for ; Thu, 30 May 2019 23:07:12 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id DE456165E; Fri, 31 May 2019 01:06:19 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz DE456165E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1559257630; bh=PAMAZdqWAFrHIyKrm2BxS3FlveNIkWU0yb0Lsp/prbA=; h=Date:From:To:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=vSHcDHDiZw3/idEEVtYXciW89G63cGtd4iyBKwCL2kFNWDVeZ5D4adp1RLoR3nYVC kDZPRgzq4jw0+hFdtWGy9LI/RBdRPMEXLT+NswPEQygfC1AyVGgBv2esltiv5WG3fT A6jP0kTQ8HZzYbIcx0nsWr3Rz3xRJoC4SevI3o0g= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 43015F8065A; Fri, 31 May 2019 01:06:19 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 613C7F896F8; Fri, 31 May 2019 01:06:17 +0200 (CEST) Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id C8DF7F8065A for ; Fri, 31 May 2019 01:06:14 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C8DF7F8065A X-IronPort-AV: E=Sophos;i="5.60,532,1549926000"; d="scan'208";a="307713717" Received: from unknown (HELO hadrien) ([207.96.196.254]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 31 May 2019 01:06:12 +0200 Date: Thu, 30 May 2019 19:06:11 -0400 (EDT) From: Julia Lawall X-X-Sender: jll@hadrien To: Kuninori Morimoto Message-ID: User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Cc: alsa-devel@alsa-project.org, Liam Girdwood , linux-kernel@vger.kernel.org, Takashi Iwai , Mark Brown , kbuild-all@01.org Subject: [alsa-devel] [PATCH] ASoC: soc-core: fix ifnullfree.cocci warnings X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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" X-Virus-Scanned: ClamAV using ClamSMTP From: kbuild test robot sound/soc/soc-core.c:391:2-7: WARNING: NULL check before some freeing functions is not needed. NULL check before some freeing functions is not needed. Based on checkpatch warning "kfree(NULL) is safe this check is probably not required" and kfreeaddr.cocci by Julia Lawall. Generated by: scripts/coccinelle/free/ifnullfree.cocci Fixes: 8e144273005d ("ASoC: soc-core: merge soc_new_pcm_runtime() and soc_rtd_init()") Signed-off-by: kbuild test robot Signed-off-by: Julia Lawall --- tree: https://github.com/morimoto/linux fw-cleanup-2019-05-30-v3 head: 7f2c61a9097fcf25dac44865db31e7eab5c8fc9d commit: 8e144273005d3caf8b9978e407e3d00b6180dd49 [96/103] ASoC: soc-core: merge soc_new_pcm_runtime() and soc_rtd_init() :::::: branch date: 12 hours ago :::::: commit date: 12 hours ago Please take the patch only if it's a positive warning. Thanks! soc-core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -387,8 +387,7 @@ static void soc_free_pcm_runtime(struct snd_soc_rtdcom_del_all(rtd); - if (rtd->codec_dais) - kfree(rtd->codec_dais); + kfree(rtd->codec_dais); list_del(&rtd->list); kfree(rtd);