summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/bluetooth/hci_h5.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/bluetooth/hci_h5.c b/drivers/bluetooth/hci_h5.c
index 376164cdf2ea..78d635f1d156 100644
--- a/drivers/bluetooth/hci_h5.c
+++ b/drivers/bluetooth/hci_h5.c
@@ -251,12 +251,8 @@ static int h5_close(struct hci_uart *hu)
if (h5->vnd && h5->vnd->close)
h5->vnd->close(h5);
- if (hu->serdev)
- serdev_device_close(hu->serdev);
-
- kfree_skb(h5->rx_skb);
- kfree(h5);
- h5 = NULL;
+ if (!hu->serdev)
+ kfree(h5);
return 0;
}