[PATCHv2 bluetooth-next 5/6] ieee802154 socket: No need to check for ARPHRD_IEEE802154 in raw_bind().

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

 



ieee802154_get_dev() only returns devices that have dev->type ==
ARPHRD_IEEE802154, therefore, there is no need to check this again
in raw_bind().

Signed-off-by: Lennert Buytenhek <buytenh@xxxxxxxxxxxxxx>
Acked-by: Alexander Aring <alex.aring@xxxxxxxxx>
---
 net/ieee802154/socket.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/net/ieee802154/socket.c b/net/ieee802154/socket.c
index d9fc5cc..02abef2 100644
--- a/net/ieee802154/socket.c
+++ b/net/ieee802154/socket.c
@@ -226,15 +226,9 @@ static int raw_bind(struct sock *sk, struct sockaddr *_uaddr, int len)
 		goto out;
 	}
 
-	if (dev->type != ARPHRD_IEEE802154) {
-		err = -ENODEV;
-		goto out_put;
-	}
-
 	sk->sk_bound_dev_if = dev->ifindex;
 	sk_dst_reset(sk);
 
-out_put:
 	dev_put(dev);
 out:
 	release_sock(sk);
-- 
2.1.0

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




[Index of Archives]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux