All of lore.kernel.org
 help / color / mirror / Atom feed
From: Firo Yang <firogm@gmail.com>
To: "Jie, Yang" <yang.jie@intel.com>
Cc: "lgirdwood@gmail.com" <lgirdwood@gmail.com>,
	"kernel-janitors@vger.kernel.org"
	<kernel-janitors@vger.kernel.org>,
	"broonie@kernel.org" <broonie@kernel.org>,
	"perex@perex.cz" <perex@perex.cz>,
	"tiwai@suse.de" <tiwai@suse.de>, "Lu, Han" <han.lu@intel.com>,
	"jarkko.nikula@linux.intel.com" <jarkko.nikula@linux.intel.com>,
	"Piskorski, Pawel" <pawel.piskorski@intel.com>,
	"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	"Jin, Yao" <yao.jin@intel.com>
Subject: Re: [PATCH] ASoC: Intel: fix Coccinelle kfree warning
Date: Mon, 27 Apr 2015 15:42:22 +0800	[thread overview]
Message-ID: <20150427074221.GA6979@firo.lan> (raw)
In-Reply-To: <E7B1D079BA13FB44A978CC8F69C7D6A905520746@SHSMSX101.ccr.corp.intel.com>

Thanks, Jie.

I find another simlar BUG in 
./sound/soc/intel/baytrail/sst-baytrail-ipc.c::sst_byt_dsp_init()
Does anyone fixed it, too?

Regards
Firo

On Mon, Apr 27, 2015 at 07:23:32AM +0000, Jie, Yang wrote:
>> -----Original Message-----
>> From: Firo Yang [mailto:firogm@gmail.com]
>> Sent: Sunday, April 26, 2015 11:42 PM
>> To: lgirdwood@gmail.com
>> Cc: kernel-janitors@vger.kernel.org; broonie@kernel.org; perex@perex.cz;
>> tiwai@suse.de; Jie, Yang; Lu, Han; jarkko.nikula@linux.intel.com; Piskorski,
>> Pawel; alsa-devel@alsa-project.org; Firo Yang
>> Subject: [PATCH] ASoC: Intel: fix Coccinelle kfree warning
>> 
>> It's not necessary to use kfree() to free memory allocated with devm_kzalloc
>> in a probe function and using kfree leads to a double free.
>> 
>> Signed-off-by: Firo Yang <firogm@gmail.com>
>> ---
>>  sound/soc/intel/haswell/sst-haswell-ipc.c | 1 -
>>  1 file changed, 1 deletion(-)
>> 
>> diff --git a/sound/soc/intel/haswell/sst-haswell-ipc.c
>> b/sound/soc/intel/haswell/sst-haswell-ipc.c
>> index 344a1e9..324eceb 100644
>> --- a/sound/soc/intel/haswell/sst-haswell-ipc.c
>> +++ b/sound/soc/intel/haswell/sst-haswell-ipc.c
>> @@ -2201,7 +2201,6 @@ dma_err:
>>  dsp_new_err:
>>  	sst_ipc_fini(ipc);
>>  ipc_init_err:
>> -	kfree(hsw);
> 
>It has been fixed by Jin Yao 2 weeks ago:
>http://git.kernel.org/cgit/linux/kernel/git/broonie/sound.git/commit/?h=for-next&id=ac98b4c015b50b1e452f8d55b612320be7f80825
>
>~Keyon
>
>>  	return ret;
>>  }
>>  EXPORT_SYMBOL_GPL(sst_hsw_dsp_init);
>> --
>> 2.1.0
>

WARNING: multiple messages have this Message-ID (diff)
From: Firo Yang <firogm@gmail.com>
To: "Jie, Yang" <yang.jie@intel.com>
Cc: "lgirdwood@gmail.com" <lgirdwood@gmail.com>,
	"kernel-janitors@vger.kernel.org"
	<kernel-janitors@vger.kernel.org>,
	"broonie@kernel.org" <broonie@kernel.org>,
	"perex@perex.cz" <perex@perex.cz>,
	"tiwai@suse.de" <tiwai@suse.de>, "Lu, Han" <han.lu@intel.com>,
	"jarkko.nikula@linux.intel.com" <jarkko.nikula@linux.intel.com>,
	"Piskorski, Pawel" <pawel.piskorski@intel.com>,
	"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	"Jin, Yao" <yao.jin@intel.com>
Subject: Re: [PATCH] ASoC: Intel: fix Coccinelle kfree warning
Date: Mon, 27 Apr 2015 07:42:22 +0000	[thread overview]
Message-ID: <20150427074221.GA6979@firo.lan> (raw)
In-Reply-To: <E7B1D079BA13FB44A978CC8F69C7D6A905520746@SHSMSX101.ccr.corp.intel.com>

Thanks, Jie.

I find another simlar BUG in 
./sound/soc/intel/baytrail/sst-baytrail-ipc.c::sst_byt_dsp_init()
Does anyone fixed it, too?

Regards
Firo

On Mon, Apr 27, 2015 at 07:23:32AM +0000, Jie, Yang wrote:
>> -----Original Message-----
>> From: Firo Yang [mailto:firogm@gmail.com]
>> Sent: Sunday, April 26, 2015 11:42 PM
>> To: lgirdwood@gmail.com
>> Cc: kernel-janitors@vger.kernel.org; broonie@kernel.org; perex@perex.cz;
>> tiwai@suse.de; Jie, Yang; Lu, Han; jarkko.nikula@linux.intel.com; Piskorski,
>> Pawel; alsa-devel@alsa-project.org; Firo Yang
>> Subject: [PATCH] ASoC: Intel: fix Coccinelle kfree warning
>> 
>> It's not necessary to use kfree() to free memory allocated with devm_kzalloc
>> in a probe function and using kfree leads to a double free.
>> 
>> Signed-off-by: Firo Yang <firogm@gmail.com>
>> ---
>>  sound/soc/intel/haswell/sst-haswell-ipc.c | 1 -
>>  1 file changed, 1 deletion(-)
>> 
>> diff --git a/sound/soc/intel/haswell/sst-haswell-ipc.c
>> b/sound/soc/intel/haswell/sst-haswell-ipc.c
>> index 344a1e9..324eceb 100644
>> --- a/sound/soc/intel/haswell/sst-haswell-ipc.c
>> +++ b/sound/soc/intel/haswell/sst-haswell-ipc.c
>> @@ -2201,7 +2201,6 @@ dma_err:
>>  dsp_new_err:
>>  	sst_ipc_fini(ipc);
>>  ipc_init_err:
>> -	kfree(hsw);
> 
>It has been fixed by Jin Yao 2 weeks ago:
>http://git.kernel.org/cgit/linux/kernel/git/broonie/sound.git/commit/?h=for-next&id¬98b4c015b50b1e452f8d55b612320be7f80825
>
>~Keyon
>
>>  	return ret;
>>  }
>>  EXPORT_SYMBOL_GPL(sst_hsw_dsp_init);
>> --
>> 2.1.0
>
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2015-04-27  7:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-26 15:42 [PATCH] ASoC: Intel: fix Coccinelle kfree warning Firo Yang
2015-04-26 15:42 ` Firo Yang
2015-04-27  7:23 ` Jie, Yang
2015-04-27  7:23   ` Jie, Yang
2015-04-27  7:42   ` Firo Yang [this message]
2015-04-27  7:42     ` Firo Yang
2015-04-27  7:52     ` Jie, Yang
2015-04-27  7:52       ` Jie, Yang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150427074221.GA6979@firo.lan \
    --to=firogm@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=han.lu@intel.com \
    --cc=jarkko.nikula@linux.intel.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=pawel.piskorski@intel.com \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.de \
    --cc=yang.jie@intel.com \
    --cc=yao.jin@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.