]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
Bluetooth: remove redundant zero check on count
authorColin Ian King <colin.king@canonical.com>
Mon, 4 Feb 2019 19:03:10 +0000 (19:03 +0000)
committerMarcel Holtmann <marcel@holtmann.org>
Mon, 18 Feb 2019 10:46:45 +0000 (11:46 +0100)
Variable count is never zero inside the loop so the check if count is
zero is redundant and can be removed. Fix this.

Detected by CoverityScan, CID#1466880 ("Logically dead code")

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
drivers/bluetooth/h4_recv.h

index 307d82166f480cb53e47c24703ff75188efdd000..87ccaceadba72a544ffcc7b6fc7669f72cf94463 100644 (file)
@@ -67,9 +67,6 @@ static inline struct sk_buff *h4_recv_buf(struct hci_dev *hdev,
        while (count) {
                int i, len;
 
-               if (!count)
-                       break;
-
                if (!skb) {
                        for (i = 0; i < pkts_count; i++) {
                                if (buffer[0] != (&pkts[i])->type)