From: Colin Ian King Date: Mon, 4 Feb 2019 19:03:10 +0000 (+0000) Subject: Bluetooth: remove redundant zero check on count X-Git-Tag: v5.1-rc1~178^2~97^2~10 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=761f1e9f99b2cec66397db59a8f77ff6cbbfa536;p=linux.git Bluetooth: remove redundant zero check on count 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 Signed-off-by: Marcel Holtmann --- diff --git a/drivers/bluetooth/h4_recv.h b/drivers/bluetooth/h4_recv.h index 307d82166f48..87ccaceadba7 100644 --- a/drivers/bluetooth/h4_recv.h +++ b/drivers/bluetooth/h4_recv.h @@ -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)