diff options
Diffstat (limited to 'drivers/s390/net/qeth_sys.c')
-rw-r--r-- | drivers/s390/net/qeth_sys.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/s390/net/qeth_sys.c b/drivers/s390/net/qeth_sys.c index f2a076a2b2f1..882d419e4160 100644 --- a/drivers/s390/net/qeth_sys.c +++ b/drivers/s390/net/qeth_sys.c | |||
@@ -1145,11 +1145,10 @@ qeth_dev_ipato_add_store(const char *buf, size_t count, | |||
1145 | if ((rc = qeth_parse_ipatoe(buf, proto, addr, &mask_bits))) | 1145 | if ((rc = qeth_parse_ipatoe(buf, proto, addr, &mask_bits))) |
1146 | return rc; | 1146 | return rc; |
1147 | 1147 | ||
1148 | if (!(ipatoe = kmalloc(sizeof(struct qeth_ipato_entry), GFP_KERNEL))){ | 1148 | if (!(ipatoe = kzalloc(sizeof(struct qeth_ipato_entry), GFP_KERNEL))){ |
1149 | PRINT_WARN("No memory to allocate ipato entry\n"); | 1149 | PRINT_WARN("No memory to allocate ipato entry\n"); |
1150 | return -ENOMEM; | 1150 | return -ENOMEM; |
1151 | } | 1151 | } |
1152 | memset(ipatoe, 0, sizeof(struct qeth_ipato_entry)); | ||
1153 | ipatoe->proto = proto; | 1152 | ipatoe->proto = proto; |
1154 | memcpy(ipatoe->addr, addr, (proto == QETH_PROT_IPV4)? 4:16); | 1153 | memcpy(ipatoe->addr, addr, (proto == QETH_PROT_IPV4)? 4:16); |
1155 | ipatoe->mask_bits = mask_bits; | 1154 | ipatoe->mask_bits = mask_bits; |