From patchwork Thu Jun 26 19:47:43 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabian Frederick X-Patchwork-Id: 4431761 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D53109F2C8 for ; Thu, 26 Jun 2014 19:49:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E3B9A201DC for ; Thu, 26 Jun 2014 19:49:34 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 3B40F2017E for ; Thu, 26 Jun 2014 19:49:33 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 74561265172; Thu, 26 Jun 2014 21:49:26 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,NO_DNS_FOR_FROM, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 50ACB2650CC; Thu, 26 Jun 2014 21:49:15 +0200 (CEST) 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 B353C2650CE; Thu, 26 Jun 2014 21:49:13 +0200 (CEST) Received: from mailrelay008.isp.belgacom.be (mailrelay008.isp.belgacom.be [195.238.6.174]) by alsa0.perex.cz (Postfix) with ESMTP id 91B0B265041 for ; Thu, 26 Jun 2014 21:49:05 +0200 (CEST) X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ak8KANh3rFNXQz8N/2dsb2JhbABagw2rSwUBAQEBAQEFAW2Yf4EOF3WEMS8jgRo3iEYBwjMXhWSJHB2ELQWaWZN1g0Q7 Received: from 13.63-67-87.adsl-dyn.isp.belgacom.be (HELO linux-zvq9.site) ([87.67.63.13]) by relay.skynet.be with ESMTP; 26 Jun 2014 21:49:00 +0200 From: Fabian Frederick To: alsa-devel@alsa-project.org Date: Thu, 26 Jun 2014 21:47:43 +0200 Message-Id: <1403812063-12251-1-git-send-email-fabf@skynet.be> X-Mailer: git-send-email 1.8.4.5 Cc: Fabian Frederick , Peter Ujfalusi , Jarkko Nikula Subject: [alsa-devel] [PATCH V2] ASoC: mcbsp: remove unnecessary null test before kfree 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: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP Fix checkpatch warning: WARNING: kfree(NULL) is safe this check is probably not required Acked-by: Peter Ujfalusi Cc: Peter Ujfalusi Cc: Jarkko Nikula Signed-off-by: Fabian Frederick Acked-by: Jarkko Nikula --- V2: replace subject "sound/soc/omap/mcbsp.c" by "ASoC: mcbsp:" (suggested by Peter Ujfalusi) sound/soc/omap/mcbsp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/omap/mcbsp.c b/sound/soc/omap/mcbsp.c index 86c7538..68a1252 100644 --- a/sound/soc/omap/mcbsp.c +++ b/sound/soc/omap/mcbsp.c @@ -621,8 +621,7 @@ void omap_mcbsp_free(struct omap_mcbsp *mcbsp) mcbsp->reg_cache = NULL; spin_unlock(&mcbsp->lock); - if (reg_cache) - kfree(reg_cache); + kfree(reg_cache); } /*