mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 22:40:54 -04:00
bus: mhi_netdev: Free background memory pool during memory free
Fix freeing the background memory pool to avoid kmemleak as part of freeing the memory pool. Change-Id: I29c9d972295900bd0b97c8ab8ee73d668e05a59f Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
This commit is contained in:
parent
96cd181257
commit
fc22a3ea18
1 changed files with 3 additions and 0 deletions
|
|
@ -411,6 +411,8 @@ static void mhi_netdev_free_pool(struct mhi_netdev *mhi_netdev)
|
|||
__free_pages(mhi_buf->page, mhi_netdev->order);
|
||||
mhi_netdev->bg_pool_size--;
|
||||
}
|
||||
|
||||
kfree(mhi_netdev->bg_pool);
|
||||
}
|
||||
|
||||
static int mhi_netdev_alloc_thread(void *data)
|
||||
|
|
@ -943,6 +945,7 @@ static void mhi_netdev_remove(struct mhi_device *mhi_dev)
|
|||
unregister_netdev(mhi_netdev->ndev);
|
||||
netif_napi_del(mhi_netdev->napi);
|
||||
free_netdev(mhi_netdev->ndev);
|
||||
mhi_netdev->ndev = NULL;
|
||||
|
||||
if (!IS_ERR_OR_NULL(mhi_netdev->dentry))
|
||||
debugfs_remove_recursive(mhi_netdev->dentry);
|
||||
|
|
|
|||
Loading…
Reference in a new issue