wlcore: sdio: drop kfree for memory allocated with devm_kzalloc
authorWei Yongjun <weiyongjun1@huawei.com>
Wed, 28 Sep 2016 14:38:36 +0000 (14:38 +0000)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 5 Oct 2016 16:05:14 +0000 (19:05 +0300)
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>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/ti/wlcore/sdio.c

index a6e94b1a12cb3f8e8cbac3c9b3074d18cfe82ee3..47fe7f96a242794caf0150f367ae8300bd1d2c48 100644 (file)
@@ -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