mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-10-01 01:35:54 -04:00
46 lines
1.5 KiB
Diff
46 lines
1.5 KiB
Diff
|
From e02e63b8014f7a0a5ea17a5196fb4ef1283fd1fd Mon Sep 17 00:00:00 2001
|
||
|
From: Sungjun Park <sjpark@codeaurora.org>
|
||
|
Date: Mon, 23 Jan 2017 13:28:44 -0800
|
||
|
Subject: bluetooth: Fix free data pointer routine
|
||
|
|
||
|
Data pointer has been reused after freed it. So,
|
||
|
it has been moved to after using the data pointer
|
||
|
to clean up resource and freed it.
|
||
|
|
||
|
Change-Id: Ibc94e092134ff1f36e896c679ade7f639254a24d
|
||
|
Signed-off-by: Sungjun Park <sjpark@codeaurora.org>
|
||
|
---
|
||
|
drivers/bluetooth/btfm_slim.c | 5 +++--
|
||
|
1 file changed, 3 insertions(+), 2 deletions(-)
|
||
|
|
||
|
diff --git a/drivers/bluetooth/btfm_slim.c b/drivers/bluetooth/btfm_slim.c
|
||
|
index a88ae0f..37cc628 100644
|
||
|
--- a/drivers/bluetooth/btfm_slim.c
|
||
|
+++ b/drivers/bluetooth/btfm_slim.c
|
||
|
@@ -1,4 +1,4 @@
|
||
|
-/* Copyright (c) 2016, The Linux Foundation. All rights reserved.
|
||
|
+/* Copyright (c) 2017, The Linux Foundation. All rights reserved.
|
||
|
*
|
||
|
* This program is free software; you can redistribute it and/or modify
|
||
|
* it under the terms of the GNU General Public License version 2 and
|
||
|
@@ -512,7 +512,6 @@ static int btfm_slim_remove(struct slim_device *slim)
|
||
|
BTFMSLIM_DBG("");
|
||
|
mutex_destroy(&btfm_slim->io_lock);
|
||
|
mutex_destroy(&btfm_slim->xfer_lock);
|
||
|
- kfree(btfm_slim);
|
||
|
snd_soc_unregister_codec(&slim->dev);
|
||
|
|
||
|
BTFMSLIM_DBG("slim_remove_device() - btfm_slim->slim_ifd");
|
||
|
@@ -520,6 +519,8 @@ static int btfm_slim_remove(struct slim_device *slim)
|
||
|
|
||
|
BTFMSLIM_DBG("slim_remove_device() - btfm_slim->slim_pgd");
|
||
|
slim_remove_device(slim);
|
||
|
+
|
||
|
+ kfree(btfm_slim);
|
||
|
return 0;
|
||
|
}
|
||
|
|
||
|
--
|
||
|
cgit v1.1
|
||
|
|