mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 06:31:49 +00:00
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>
This commit is contained in:
parent
01c8d2bbd4
commit
66a3297f6d
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user