diff options
author | Tom Parkin <tparkin@katalix.com> | 2020-07-22 18:32:05 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-07-23 03:08:39 +0200 |
commit | b71a61ccfebb4ff733d2d9fc66cd5c75b7ae46a2 (patch) | |
tree | 3ff36708660e2921d2e01e72d1d1a7346a141306 /net/l2tp/l2tp_netlink.c | |
parent | devlink: Always use user_ptr[0] for devlink and simplify post_doit (diff) | |
download | linux-b71a61ccfebb4ff733d2d9fc66cd5c75b7ae46a2.tar.xz linux-b71a61ccfebb4ff733d2d9fc66cd5c75b7ae46a2.zip |
l2tp: cleanup whitespace use
Fix up various whitespace issues as reported by checkpatch.pl:
* remove spaces around operators where appropriate,
* add missing blank lines following declarations,
* remove multiple blank lines, or trailing blank lines at the end of
functions.
Signed-off-by: Tom Parkin <tparkin@katalix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/l2tp/l2tp_netlink.c')
-rw-r--r-- | net/l2tp/l2tp_netlink.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/l2tp/l2tp_netlink.c b/net/l2tp/l2tp_netlink.c index ebb381c3f1b9..0ce8e94ace78 100644 --- a/net/l2tp/l2tp_netlink.c +++ b/net/l2tp/l2tp_netlink.c @@ -27,7 +27,6 @@ #include "l2tp_core.h" - static struct genl_family l2tp_nl_family; static const struct genl_multicast_group l2tp_multicast_group[] = { @@ -570,6 +569,7 @@ static int l2tp_nl_cmd_session_create(struct sk_buff *skb, struct genl_info *inf if (info->attrs[L2TP_ATTR_COOKIE]) { u16 len = nla_len(info->attrs[L2TP_ATTR_COOKIE]); + if (len > 8) { ret = -EINVAL; goto out_tunnel; @@ -579,6 +579,7 @@ static int l2tp_nl_cmd_session_create(struct sk_buff *skb, struct genl_info *inf } if (info->attrs[L2TP_ATTR_PEER_COOKIE]) { u16 len = nla_len(info->attrs[L2TP_ATTR_PEER_COOKIE]); + if (len > 8) { ret = -EINVAL; goto out_tunnel; |