From: Ziyang Xuan Date: Mon, 7 Aug 2023 02:32:06 +0000 (+0800) Subject: Bluetooth: Remove unnecessary NULL check before vfree() X-Git-Tag: v6.6.17~4098^2~129^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3cd43dd15f9dbfb67a60889992bf03b92370b202;p=platform%2Fkernel%2Flinux-rpi.git 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 Signed-off-by: Luiz Augusto von Dentz --- diff --git a/net/bluetooth/coredump.c b/net/bluetooth/coredump.c index d2d2624..ec97a4b 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); }