All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] wlcore: sdio: drop kfree for memory allocated with devm_kzalloc
@ 2016-09-28 14:38 Wei Yongjun
  2016-09-28 15:11 ` Tony Lindgren
  2016-10-05 16:05 ` [-next] " Kalle Valo
  0 siblings, 2 replies; 3+ messages in thread
From: Wei Yongjun @ 2016-09-28 14:38 UTC (permalink / raw)
  To: Kalle Valo, Bruno Herrera, Tony Lindgren; +Cc: Wei Yongjun, linux-wireless

From: Wei Yongjun <weiyongjun1@huawei.com>

It's not necessary to free memory allocated with devm_kzalloc
and using kfree leads to a double free.

Fixes: d776fc86b82f ("wlcore: sdio: Populate config firmware data")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/net/wireless/ti/wlcore/sdio.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/wireless/ti/wlcore/sdio.c b/drivers/net/wireless/ti/wlcore/sdio.c
index a6e94b1..47fe7f9 100644
--- a/drivers/net/wireless/ti/wlcore/sdio.c
+++ b/drivers/net/wireless/ti/wlcore/sdio.c
@@ -391,7 +391,6 @@ static void wl1271_remove(struct sdio_func *func)
 	pm_runtime_get_noresume(&func->dev);
 
 	platform_device_unregister(glue->core);
-	kfree(glue);
 }
 
 #ifdef CONFIG_PM

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] wlcore: sdio: drop kfree for memory allocated with devm_kzalloc
  2016-09-28 14:38 [PATCH -next] wlcore: sdio: drop kfree for memory allocated with devm_kzalloc Wei Yongjun
@ 2016-09-28 15:11 ` Tony Lindgren
  2016-10-05 16:05 ` [-next] " Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Tony Lindgren @ 2016-09-28 15:11 UTC (permalink / raw)
  To: Wei Yongjun; +Cc: Kalle Valo, Bruno Herrera, Wei Yongjun, linux-wireless

* Wei Yongjun <weiyj.lk@gmail.com> [160928 07:39]:
> From: Wei Yongjun <weiyongjun1@huawei.com>
> 
> It's not necessary to free memory allocated with devm_kzalloc
> and using kfree leads to a double free.
> 
> Fixes: d776fc86b82f ("wlcore: sdio: Populate config firmware data")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>

Oops thanks for catching this:

Acked-by: Tony Lindgren <tony@atomide.com>

> ---
>  drivers/net/wireless/ti/wlcore/sdio.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/net/wireless/ti/wlcore/sdio.c b/drivers/net/wireless/ti/wlcore/sdio.c
> index a6e94b1..47fe7f9 100644
> --- a/drivers/net/wireless/ti/wlcore/sdio.c
> +++ b/drivers/net/wireless/ti/wlcore/sdio.c
> @@ -391,7 +391,6 @@ static void wl1271_remove(struct sdio_func *func)
>  	pm_runtime_get_noresume(&func->dev);
>  
>  	platform_device_unregister(glue->core);
> -	kfree(glue);
>  }
>  
>  #ifdef CONFIG_PM
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [-next] wlcore: sdio: drop kfree for memory allocated with devm_kzalloc
  2016-09-28 14:38 [PATCH -next] wlcore: sdio: drop kfree for memory allocated with devm_kzalloc Wei Yongjun
  2016-09-28 15:11 ` Tony Lindgren
@ 2016-10-05 16:05 ` Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2016-10-05 16:05 UTC (permalink / raw)
  To: Wei Yongjun; +Cc: Bruno Herrera, Tony Lindgren, Wei Yongjun, linux-wireless

Wei Yongjun <weiyj.lk@gmail.com> wrote:
> From: Wei Yongjun <weiyongjun1@huawei.com>
> 
> It's not necessary to free memory allocated with devm_kzalloc
> and using kfree leads to a double free.
> 
> Fixes: d776fc86b82f ("wlcore: sdio: Populate config firmware data")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> Acked-by: Tony Lindgren <tony@atomide.com>

Patch applied to wireless-drivers.git, thanks.

f38b7c254753 wlcore: sdio: drop kfree for memory allocated with devm_kzalloc

-- 
https://patchwork.kernel.org/patch/9353985/

Documentation about submitting wireless patches and checking status
from patchwork:

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-10-05 16:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-28 14:38 [PATCH -next] wlcore: sdio: drop kfree for memory allocated with devm_kzalloc Wei Yongjun
2016-09-28 15:11 ` Tony Lindgren
2016-10-05 16:05 ` [-next] " Kalle Valo

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.