From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752021AbdHPEzm (ORCPT ); Wed, 16 Aug 2017 00:55:42 -0400 Received: from mga02.intel.com ([134.134.136.20]:23479 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750902AbdHPEzl (ORCPT ); Wed, 16 Aug 2017 00:55:41 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,381,1498546800"; d="scan'208";a="124072228" Date: Wed, 16 Aug 2017 10:28:53 +0530 From: Vinod Koul To: SF Markus Elfring Cc: alsa-devel@alsa-project.org, Jaroslav Kysela , Lars-Peter Clausen , Liam Girdwood , Mark Brown , Takashi Iwai , LKML , kernel-janitors@vger.kernel.org Subject: Re: [PATCH] ASoC: Medfield: Delete an error message for a failed memory allocation in snd_mfld_mc_probe() Message-ID: <20170816045853.GP3053@localhost> References: <161e9c4c-1c97-d06f-35ec-3f165ad9e52e@users.sourceforge.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <161e9c4c-1c97-d06f-35ec-3f165ad9e52e@users.sourceforge.net> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 11, 2017 at 11:33:56AM +0200, SF Markus Elfring wrote: > From: Markus Elfring > Date: Fri, 11 Aug 2017 11:25:41 +0200 > > Omit an extra message for a memory allocation failure in this function. > > This issue was detected by using the Coccinelle software. Acked-By: Vinod Koul > > Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf > Signed-off-by: Markus Elfring > --- > sound/soc/intel/boards/mfld_machine.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/sound/soc/intel/boards/mfld_machine.c b/sound/soc/intel/boards/mfld_machine.c > index 4e08885f37aa..6f44acfb4aae 100644 > --- a/sound/soc/intel/boards/mfld_machine.c > +++ b/sound/soc/intel/boards/mfld_machine.c > @@ -376,10 +376,8 @@ static int snd_mfld_mc_probe(struct platform_device *pdev) > /* audio interrupt base of SRAM location where > * interrupts are stored by System FW */ > mc_drv_ctx = devm_kzalloc(&pdev->dev, sizeof(*mc_drv_ctx), GFP_ATOMIC); > - if (!mc_drv_ctx) { > - pr_err("allocation failed\n"); > + if (!mc_drv_ctx) > return -ENOMEM; > - } > > irq_mem = platform_get_resource_byname( > pdev, IORESOURCE_MEM, "IRQ_BASE"); > -- > 2.14.0 > -- ~Vinod