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

Gustavo F. Padovan
2010-04-01T20:23:52Z

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@profusion.mobi>
Reviewed-by: João Paulo Rechi Vita <jprvita@profusion.mobi>
---
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