summaryrefslogtreecommitdiffstats
path: root/net/ieee802154
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2022-10-28 00:37:56 +0200
committerJakub Kicinski <kuba@kernel.org>2022-10-28 01:56:36 +0200
commit31f1aa4f740fc591450777f4ff94d6e062b6f632 (patch)
treeb6bfe700d8338b3c88f4d8413b624d0d5fd78e4a /net/ieee802154
parentskbuff: Proactively round up to kmalloc bucket size (diff)
parentMerge tag 'net-6.1-rc3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ne... (diff)
downloadlinux-31f1aa4f740fc591450777f4ff94d6e062b6f632.tar.xz
linux-31f1aa4f740fc591450777f4ff94d6e062b6f632.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c 2871edb32f46 ("can: kvaser_usb: Fix possible completions during init_completion") abb8670938b2 ("can: kvaser_usb_leaf: Ignore stale bus-off after start") 8d21f5927ae6 ("can: kvaser_usb_leaf: Fix improved state not being reported") Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/ieee802154')
-rw-r--r--net/ieee802154/socket.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/ieee802154/socket.c b/net/ieee802154/socket.c
index 6e55fae4c686..1fa2fe041ec0 100644
--- a/net/ieee802154/socket.c
+++ b/net/ieee802154/socket.c
@@ -502,8 +502,10 @@ static int dgram_bind(struct sock *sk, struct sockaddr *uaddr, int len)
if (err < 0)
goto out;
- if (addr->family != AF_IEEE802154)
+ if (addr->family != AF_IEEE802154) {
+ err = -EINVAL;
goto out;
+ }
ieee802154_addr_from_sa(&haddr, &addr->addr);
dev = ieee802154_get_dev(sock_net(sk), &haddr);