Commit 66a3297f authored by Lennert Buytenhek's avatar Lennert Buytenhek Committed by Marcel Holtmann

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: default avatarLennert Buytenhek <buytenh@wantstofly.org>
Acked-by: default avatarAlexander Aring <alex.aring@gmail.com>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent 01c8d2bb
...@@ -226,15 +226,9 @@ static int raw_bind(struct sock *sk, struct sockaddr *_uaddr, int len) ...@@ -226,15 +226,9 @@ static int raw_bind(struct sock *sk, struct sockaddr *_uaddr, int len)
goto out; goto out;
} }
if (dev->type != ARPHRD_IEEE802154) {
err = -ENODEV;
goto out_put;
}
sk->sk_bound_dev_if = dev->ifindex; sk->sk_bound_dev_if = dev->ifindex;
sk_dst_reset(sk); sk_dst_reset(sk);
out_put:
dev_put(dev); dev_put(dev);
out: out:
release_sock(sk); release_sock(sk);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment