Skip to contentSkip to conversation

Bluetooth: btintel_pcie: Remove unused ret in btintel_pcie_submit_rx_work()

PATCH New Robertus Diawan Chris 1 participant 1 message Apr 30 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Bluetooth: btintel_pcie: Remove unused ret in btintel_pcie_submit_rx_work()

The variable ret assigned to -EINVAL, however, this value is never read and re-assigned a new value when the code jumps to label resubmit. The assignment is redundant and can be removed.

This is reported by Coverity Scan with CID 1598882 as UNUSED_VALUE.

---
 drivers/bluetooth/btintel_pcie.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/bluetooth/btintel_pcie.c +1 -3
index 2f59c0d6f9ec..ac4f5b45a6af 100644
@@ -1376,10 +1376,8 @@ static int btintel_pcie_submit_rx_work(struct btintel_pcie_data *data, u8 status
 	rfh_hdr = buf;
 
 	len = rfh_hdr->packet_len;
-	if (len <= 0) {
-		ret = -EINVAL;
+	if (len <= 0)
 		goto resubmit;
-	}
 
 	/* Remove RFH header */
 	buf += sizeof(*rfh_hdr);

base-commit: 254f49634ee16a731174d2ae34bc50bd5f45e731

Signature · 1 line
2.54.0