aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/net/lcs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/net/lcs.c')
-rw-r--r--drivers/s390/net/lcs.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/s390/net/lcs.c b/drivers/s390/net/lcs.c
index 9cf88d7201d3..edcf05d5d568 100644
--- a/drivers/s390/net/lcs.c
+++ b/drivers/s390/net/lcs.c
@@ -115,11 +115,10 @@ lcs_alloc_channel(struct lcs_channel *channel)
115 LCS_DBF_TEXT(2, setup, "ichalloc"); 115 LCS_DBF_TEXT(2, setup, "ichalloc");
116 for (cnt = 0; cnt < LCS_NUM_BUFFS; cnt++) { 116 for (cnt = 0; cnt < LCS_NUM_BUFFS; cnt++) {
117 /* alloc memory fo iobuffer */ 117 /* alloc memory fo iobuffer */
118 channel->iob[cnt].data = (void *) 118 channel->iob[cnt].data =
119 kmalloc(LCS_IOBUFFERSIZE, GFP_DMA | GFP_KERNEL); 119 kzalloc(LCS_IOBUFFERSIZE, GFP_DMA | GFP_KERNEL);
120 if (channel->iob[cnt].data == NULL) 120 if (channel->iob[cnt].data == NULL)
121 break; 121 break;
122 memset(channel->iob[cnt].data, 0, LCS_IOBUFFERSIZE);
123 channel->iob[cnt].state = BUF_STATE_EMPTY; 122 channel->iob[cnt].state = BUF_STATE_EMPTY;
124 } 123 }
125 if (cnt < LCS_NUM_BUFFS) { 124 if (cnt < LCS_NUM_BUFFS) {
@@ -182,10 +181,9 @@ lcs_alloc_card(void)
182 181
183 LCS_DBF_TEXT(2, setup, "alloclcs"); 182 LCS_DBF_TEXT(2, setup, "alloclcs");
184 183
185 card = kmalloc(sizeof(struct lcs_card), GFP_KERNEL | GFP_DMA); 184 card = kzalloc(sizeof(struct lcs_card), GFP_KERNEL | GFP_DMA);
186 if (card == NULL) 185 if (card == NULL)
187 return NULL; 186 return NULL;
188 memset(card, 0, sizeof(struct lcs_card));
189 card->lan_type = LCS_FRAME_TYPE_AUTO; 187 card->lan_type = LCS_FRAME_TYPE_AUTO;
190 card->pkt_seq = 0; 188 card->pkt_seq = 0;
191 card->lancmd_timeout = LCS_LANCMD_TIMEOUT_DEFAULT; 189 card->lancmd_timeout = LCS_LANCMD_TIMEOUT_DEFAULT;
@@ -793,10 +791,9 @@ lcs_alloc_reply(struct lcs_cmd *cmd)
793 791
794 LCS_DBF_TEXT(4, trace, "getreply"); 792 LCS_DBF_TEXT(4, trace, "getreply");
795 793
796 reply = kmalloc(sizeof(struct lcs_reply), GFP_ATOMIC); 794 reply = kzalloc(sizeof(struct lcs_reply), GFP_ATOMIC);
797 if (!reply) 795 if (!reply)
798 return NULL; 796 return NULL;
799 memset(reply,0,sizeof(struct lcs_reply));
800 atomic_set(&reply->refcnt,1); 797 atomic_set(&reply->refcnt,1);
801 reply->sequence_no = cmd->sequence_no; 798 reply->sequence_no = cmd->sequence_no;
802 reply->received = 0; 799 reply->received = 0;