Commit 3cd43dd1 authored by Ziyang Xuan's avatar Ziyang Xuan Committed by Luiz Augusto von Dentz

Bluetooth: Remove unnecessary NULL check before vfree()

Remove unnecessary NULL check which causes coccinelle warning:

net/bluetooth/coredump.c:104:2-7: WARNING: NULL check before some
freeing functions is not needed.
Signed-off-by: default avatarZiyang Xuan <william.xuanziyang@huawei.com>
Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
parent a2bcd2b6
...@@ -100,8 +100,7 @@ void hci_devcd_reset(struct hci_dev *hdev) ...@@ -100,8 +100,7 @@ void hci_devcd_reset(struct hci_dev *hdev)
/* Call with hci_dev_lock only. */ /* Call with hci_dev_lock only. */
static void hci_devcd_free(struct hci_dev *hdev) static void hci_devcd_free(struct hci_dev *hdev)
{ {
if (hdev->dump.head) vfree(hdev->dump.head);
vfree(hdev->dump.head);
hci_devcd_reset(hdev); hci_devcd_reset(hdev);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment