diff options
author | Lennert Buytenhek <buytenh@wantstofly.org> | 2015-05-25 15:38:45 +0300 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2015-05-26 20:26:10 +0200 |
commit | 66a3297f6d3f9dc35e27c3cec6b4437ac13f07ff (patch) | |
tree | a16a51e79ed82bba0933feb546289996890774c9 /net/ieee802154 | |
parent | 01c8d2bbd407a178f5bfe0312c32aec345066697 (diff) | |
download | op-kernel-dev-66a3297f6d3f9dc35e27c3cec6b4437ac13f07ff.zip op-kernel-dev-66a3297f6d3f9dc35e27c3cec6b4437ac13f07ff.tar.gz |
ieee802154 socket: No need to check for ARPHRD_IEEE802154 in raw_bind().
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@wantstofly.org>
Acked-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/ieee802154')
-rw-r--r-- | net/ieee802154/socket.c | 6 |
1 files changed, 0 insertions, 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); |