projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a2bcd2b
)
Bluetooth: Remove unnecessary NULL check before vfree()
author
Ziyang Xuan
<william.xuanziyang@huawei.com>
Mon, 7 Aug 2023 02:32:06 +0000
(10:32 +0800)
committer
Luiz Augusto von Dentz
<luiz.von.dentz@intel.com>
Fri, 11 Aug 2023 18:56:54 +0000
(11:56 -0700)
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>
net/bluetooth/coredump.c
patch
|
blob
|
history
diff --git
a/net/bluetooth/coredump.c
b/net/bluetooth/coredump.c
index d2d2624ec708fe2f61518b871f33a5167911923f..ec97a4bab1c9f8aedadaa30a5e3c71e9b756bf86 100644
(file)
--- 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);
}