Skip to content

Commit

Permalink
ieee802154 socket: No need to check for ARPHRD_IEEE802154 in raw_bind().
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Alexander Aring <[email protected]>
Signed-off-by: Marcel Holtmann <[email protected]>
  • Loading branch information
buytenh authored and holtmann committed May 26, 2015
1 parent 01c8d2b commit 66a3297
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions net/ieee802154/socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 66a3297

Please sign in to comment.