diff options
Diffstat (limited to '')
-rw-r--r-- | net/x25/af_x25.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c index 5c7ad301d..5a8b2ea56 100644 --- a/net/x25/af_x25.c +++ b/net/x25/af_x25.c @@ -460,12 +460,12 @@ static int x25_getsockopt(struct socket *sock, int level, int optname, if (get_user(len, optlen)) goto out; - len = min_t(unsigned int, len, sizeof(int)); - rc = -EINVAL; if (len < 0) goto out; + len = min_t(unsigned int, len, sizeof(int)); + rc = -EFAULT; if (put_user(len, optlen)) goto out; |