aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/net/qeth.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/net/qeth.h')
-rw-r--r--drivers/s390/net/qeth.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/s390/net/qeth.h b/drivers/s390/net/qeth.h
index 4df0fcd7b10b..65e2b1bc08a5 100644
--- a/drivers/s390/net/qeth.h
+++ b/drivers/s390/net/qeth.h
@@ -1099,7 +1099,7 @@ qeth_string_to_ipaddr4(const char *buf, __u8 *addr)
1099 1099
1100 rc = sscanf(buf, "%d.%d.%d.%d%n", 1100 rc = sscanf(buf, "%d.%d.%d.%d%n",
1101 &in[0], &in[1], &in[2], &in[3], &count); 1101 &in[0], &in[1], &in[2], &in[3], &count);
1102 if (rc != 4 || count) 1102 if (rc != 4 || count<=0)
1103 return -EINVAL; 1103 return -EINVAL;
1104 for (count = 0; count < 4; count++) { 1104 for (count = 0; count < 4; count++) {
1105 if (in[count] > 255) 1105 if (in[count] > 255)