diff --git a/include/net/sock.h b/include/net/sock.h index 8462ffa5a131..ea8dd9d71ac5 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -463,7 +463,6 @@ struct sock { sk_userlocks : 4, sk_protocol : 8, sk_type : 16; -#define SK_PROTOCOL_MAX U8_MAX u16 sk_gso_max_segs; u8 sk_pacing_shift; unsigned long sk_lingertime; diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c index aff991ca0e4a..302696254ae6 100644 --- a/net/ax25/af_ax25.c +++ b/net/ax25/af_ax25.c @@ -831,7 +831,7 @@ static int ax25_create(struct net *net, struct socket *sock, int protocol, struct sock *sk; ax25_cb *ax25; - if (protocol < 0 || protocol > SK_PROTOCOL_MAX) + if (protocol < 0 || protocol > U8_MAX) return -EINVAL; if (!net_eq(net, &init_net))