Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1347346ybi; Thu, 30 May 2019 16:08:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqztiU0mWKJdoctUIwojGI8SxPiTdZ+cH8cY74ds/DkY8G6X5M+j9zd1RShAu1Sr4acX6jTn X-Received: by 2002:a17:902:bc86:: with SMTP id bb6mr6048330plb.129.1559257696932; Thu, 30 May 2019 16:08:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559257696; cv=none; d=google.com; s=arc-20160816; b=gKiMQY+eUBpEovuY5MTxyYSAT7mx1LcFJoAZi7spIh+tlEe05vYPyGSaiq3gEyHZ3b D0V1/DD99rRHykD6odlUjRX61PQWQB6hpx4C6HtuvXCOQZfrQP/LWOduyFUh81/3RdkJ 3rCv5zYGtbiRPpiQBLpe3XKTk7kQM96FoPt40jMUDYU+KJ+l779TJdxmEdcf1pTYmgJg HwCYXm/X0O4qdTisbkql19nnihZdENb0gGeeMC/wu2Ts9ZbNX+W5lui4fQmPhK+sefPT DI6qFb1n3VfTArhRfRlYw/tZDT9flMtvE6ofjtfk/mAQy4IPYkwiWoMCYLgbhaCSPY4E 8kxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :subject:cc:to:from:date; bh=tvsCp1wQe4EVd1kqRYBAFWkee/Bp+L2qcSanv+/Pe/o=; b=GnGX+NBsrJOGLmrrR/O1Zql1ynQFxD13qrMgQmDOh/MTlR6FXVssSX84vm4gJ0XSIu oE/48R0C/NSv5I6C5FFHhniqTb69eu0IlyU4kLt0X3Vi0GzMyJJr6i24zzST3OwXexHi PzXDiY9ilmC+CLBL34AqoS+Bs4GJSEAqpyTPQvxG2Jj6wzszxelnIXmhzKKZroiUmdbk xwmCG7o7jVPLFm8by3ZcuG845zyg260etHw8m1MzasQpXLLRSP+vIyRJUKFohKgilgMK krRcD50oBxS/51bFwd9n9w31k/NtjOXk+85OZEMiGcJFN84+P735iI6iDA9bNDW8rASF bk1g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w16si4177892pgf.138.2019.05.30.16.08.00; Thu, 30 May 2019 16:08:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726725AbfE3XGP (ORCPT + 99 others); Thu, 30 May 2019 19:06:15 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:55926 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726100AbfE3XGP (ORCPT ); Thu, 30 May 2019 19:06:15 -0400 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 cc: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, kbuild-all@01.org Subject: [PATCH] ASoC: soc-core: fix ifnullfree.cocci warnings Message-ID: User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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);