aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZiyang Xuan <william.xuanziyang@huawei.com>2023-08-07 10:32:06 +0800
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2023-08-11 11:56:54 -0700
commit3cd43dd15f9dbfb67a60889992bf03b92370b202 (patch)
treeff27a992ae228a5b82d5d608ad5c2a48a170c59f
parenta2bcd2b63271a93a695fabbfbf459c603d956d48 (diff)
downloadnf-next-3cd43dd15f9dbfb67a60889992bf03b92370b202.tar.gz
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: Ziyang Xuan <william.xuanziyang@huawei.com> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
-rw-r--r--net/bluetooth/coredump.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/bluetooth/coredump.c b/net/bluetooth/coredump.c
index d2d2624ec708fe..ec97a4bab1c9f8 100644
--- a/net/bluetooth/coredump.c
+++ b/net/bluetooth/coredump.c
@@ -100,8 +100,7 @@ void hci_devcd_reset(struct hci_dev *hdev)
/* Call with hci_dev_lock only. */
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);
}