[PATCH 34/34] Bluetooth: Remove unneeded check for MTU on sco_send_frame()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We have

count = min_t(unsigned int, conn->mtu, len);

there, so no need to return on len > conn->mtu.

Signed-off-by: Gustavo F. Padovan <padovan@xxxxxxxxxxxxxx>
Reviewed-by: João Paulo Rechi Vita <jprvita@xxxxxxxxxxxxxx>
---
 net/bluetooth/sco.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c
index 1dc7856..e2da719 100644
--- a/net/bluetooth/sco.c
+++ b/net/bluetooth/sco.c
@@ -234,10 +234,6 @@ static inline int sco_send_frame(struct sock *sk, struct msghdr *msg, int len)
 	struct sk_buff *skb;
 	int err, count;
 
-	/* Check outgoing MTU */
-	if (len > conn->mtu)
-		return -EINVAL;
-
 	BT_DBG("sk %p len %d", sk, len);
 
 	count = min_t(unsigned int, conn->mtu, len);
-- 
1.6.4.4

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux