diff --git a/net/smc/af_smc.c b/net/smc/af_smc.c index 2c369d4bb1c1fb280a3059bfdb032b4041fa5e02..973b4471b532b0e64525e94bb2cb181a88b17bbc 100644 --- a/net/smc/af_smc.c +++ b/net/smc/af_smc.c @@ -1420,7 +1420,7 @@ static int smc_setsockopt(struct socket *sock, int level, int optname, return rc; if (optlen < sizeof(int)) - return rc; + return -EINVAL; get_user(val, (int __user *)optval); lock_sock(sk);