Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754978AbbDPOFq (ORCPT ); Thu, 16 Apr 2015 10:05:46 -0400 Received: from mga14.intel.com ([192.55.52.115]:37820 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753327AbbDPOFi (ORCPT ); Thu, 16 Apr 2015 10:05:38 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,588,1422950400"; d="scan'208";a="714716096" Message-ID: <552FC1AD.7030207@linux.intel.com> Date: Thu, 16 Apr 2015 17:05:33 +0300 From: Jarkko Nikula User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.6.0 MIME-Version: 1.0 To: weiyj_lk@163.com, Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Jin Yao , Jie Yang , Andy Shevchenko CC: Wei Yongjun , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH -next] ASoC: Intel: sst_byt: remove kfree for memory allocated with devm_kzalloc References: <1429191989-25919-1-git-send-email-weiyj_lk@163.com> In-Reply-To: <1429191989-25919-1-git-send-email-weiyj_lk@163.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1186 Lines: 35 Hi On 04/16/2015 04:46 PM, weiyj_lk@163.com wrote: > From: Wei Yongjun > > It's not necessary to free memory allocated with devm_kzalloc > and using kfree leads to a double free. > > Signed-off-by: Wei Yongjun > --- > sound/soc/intel/baytrail/sst-baytrail-ipc.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/sound/soc/intel/baytrail/sst-baytrail-ipc.c b/sound/soc/intel/baytrail/sst-baytrail-ipc.c > index 1efb33b..a839dbf 100644 > --- a/sound/soc/intel/baytrail/sst-baytrail-ipc.c > +++ b/sound/soc/intel/baytrail/sst-baytrail-ipc.c > @@ -759,7 +759,6 @@ fw_err: > dsp_new_err: > sst_ipc_fini(ipc); > ipc_init_err: > - kfree(byt); > > return err; > } > Above kfree(byt) appears to be added by accident in the commit 48cec59b6f38 ("ASoC: Intel: Use the generic IPC/mailbox APIs in Baytrail"). Acked-by: Jarkko Nikula -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/