aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/ax25/af_ax25.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c
index 4b4d2b779ec1..a00123ebb0ae 100644
--- a/net/ax25/af_ax25.c
+++ b/net/ax25/af_ax25.c
@@ -1735,7 +1735,7 @@ static int ax25_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
1735 res = -EFAULT; 1735 res = -EFAULT;
1736 break; 1736 break;
1737 } 1737 }
1738 if (amount > AX25_NOUID_BLOCK) { 1738 if (amount < 0 || amount > AX25_NOUID_BLOCK) {
1739 res = -EINVAL; 1739 res = -EINVAL;
1740 break; 1740 break;
1741 } 1741 }