diff --git a/drivers/bluetooth/btfm_slim.c b/drivers/bluetooth/btfm_slim.c index a88ae0f59e63..37cc6284cf97 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; }