aboutsummaryrefslogtreecommitdiffstats
path: root/net/can/bcm.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/can/bcm.c')
-rw-r--r--net/can/bcm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/can/bcm.c b/net/can/bcm.c
index 9d5e8accfab1..092dc88a7c64 100644
--- a/net/can/bcm.c
+++ b/net/can/bcm.c
@@ -1256,6 +1256,9 @@ static int bcm_sendmsg(struct kiocb *iocb, struct socket *sock,
1256 struct sockaddr_can *addr = 1256 struct sockaddr_can *addr =
1257 (struct sockaddr_can *)msg->msg_name; 1257 (struct sockaddr_can *)msg->msg_name;
1258 1258
1259 if (msg->msg_namelen < sizeof(*addr))
1260 return -EINVAL;
1261
1259 if (addr->can_family != AF_CAN) 1262 if (addr->can_family != AF_CAN)
1260 return -EINVAL; 1263 return -EINVAL;
1261 1264