diff options
Diffstat (limited to 'net/irda/irlap_frame.c')
-rw-r--r-- | net/irda/irlap_frame.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/net/irda/irlap_frame.c b/net/irda/irlap_frame.c index 3e9a06abbdd0..ccb983bf0f4a 100644 --- a/net/irda/irlap_frame.c +++ b/net/irda/irlap_frame.c | |||
@@ -117,7 +117,7 @@ void irlap_send_snrm_frame(struct irlap_cb *self, struct qos_info *qos) | |||
117 | IRDA_ASSERT(self->magic == LAP_MAGIC, return;); | 117 | IRDA_ASSERT(self->magic == LAP_MAGIC, return;); |
118 | 118 | ||
119 | /* Allocate frame */ | 119 | /* Allocate frame */ |
120 | tx_skb = dev_alloc_skb(64); | 120 | tx_skb = alloc_skb(64, GFP_ATOMIC); |
121 | if (!tx_skb) | 121 | if (!tx_skb) |
122 | return; | 122 | return; |
123 | 123 | ||
@@ -210,7 +210,7 @@ void irlap_send_ua_response_frame(struct irlap_cb *self, struct qos_info *qos) | |||
210 | IRDA_ASSERT(self->magic == LAP_MAGIC, return;); | 210 | IRDA_ASSERT(self->magic == LAP_MAGIC, return;); |
211 | 211 | ||
212 | /* Allocate frame */ | 212 | /* Allocate frame */ |
213 | tx_skb = dev_alloc_skb(64); | 213 | tx_skb = alloc_skb(64, GFP_ATOMIC); |
214 | if (!tx_skb) | 214 | if (!tx_skb) |
215 | return; | 215 | return; |
216 | 216 | ||
@@ -250,7 +250,7 @@ void irlap_send_dm_frame( struct irlap_cb *self) | |||
250 | IRDA_ASSERT(self != NULL, return;); | 250 | IRDA_ASSERT(self != NULL, return;); |
251 | IRDA_ASSERT(self->magic == LAP_MAGIC, return;); | 251 | IRDA_ASSERT(self->magic == LAP_MAGIC, return;); |
252 | 252 | ||
253 | tx_skb = dev_alloc_skb(32); | 253 | tx_skb = alloc_skb(32, GFP_ATOMIC); |
254 | if (!tx_skb) | 254 | if (!tx_skb) |
255 | return; | 255 | return; |
256 | 256 | ||
@@ -282,7 +282,7 @@ void irlap_send_disc_frame(struct irlap_cb *self) | |||
282 | IRDA_ASSERT(self != NULL, return;); | 282 | IRDA_ASSERT(self != NULL, return;); |
283 | IRDA_ASSERT(self->magic == LAP_MAGIC, return;); | 283 | IRDA_ASSERT(self->magic == LAP_MAGIC, return;); |
284 | 284 | ||
285 | tx_skb = dev_alloc_skb(16); | 285 | tx_skb = alloc_skb(16, GFP_ATOMIC); |
286 | if (!tx_skb) | 286 | if (!tx_skb) |
287 | return; | 287 | return; |
288 | 288 | ||
@@ -315,7 +315,7 @@ void irlap_send_discovery_xid_frame(struct irlap_cb *self, int S, __u8 s, | |||
315 | IRDA_ASSERT(self->magic == LAP_MAGIC, return;); | 315 | IRDA_ASSERT(self->magic == LAP_MAGIC, return;); |
316 | IRDA_ASSERT(discovery != NULL, return;); | 316 | IRDA_ASSERT(discovery != NULL, return;); |
317 | 317 | ||
318 | tx_skb = dev_alloc_skb(64); | 318 | tx_skb = alloc_skb(64, GFP_ATOMIC); |
319 | if (!tx_skb) | 319 | if (!tx_skb) |
320 | return; | 320 | return; |
321 | 321 | ||
@@ -422,11 +422,10 @@ static void irlap_recv_discovery_xid_rsp(struct irlap_cb *self, | |||
422 | return; | 422 | return; |
423 | } | 423 | } |
424 | 424 | ||
425 | if ((discovery = kmalloc(sizeof(discovery_t), GFP_ATOMIC)) == NULL) { | 425 | if ((discovery = kzalloc(sizeof(discovery_t), GFP_ATOMIC)) == NULL) { |
426 | IRDA_WARNING("%s: kmalloc failed!\n", __FUNCTION__); | 426 | IRDA_WARNING("%s: kmalloc failed!\n", __FUNCTION__); |
427 | return; | 427 | return; |
428 | } | 428 | } |
429 | memset(discovery, 0, sizeof(discovery_t)); | ||
430 | 429 | ||
431 | discovery->data.daddr = info->daddr; | 430 | discovery->data.daddr = info->daddr; |
432 | discovery->data.saddr = self->saddr; | 431 | discovery->data.saddr = self->saddr; |
@@ -576,7 +575,7 @@ void irlap_send_rr_frame(struct irlap_cb *self, int command) | |||
576 | struct sk_buff *tx_skb; | 575 | struct sk_buff *tx_skb; |
577 | __u8 *frame; | 576 | __u8 *frame; |
578 | 577 | ||
579 | tx_skb = dev_alloc_skb(16); | 578 | tx_skb = alloc_skb(16, GFP_ATOMIC); |
580 | if (!tx_skb) | 579 | if (!tx_skb) |
581 | return; | 580 | return; |
582 | 581 | ||
@@ -601,7 +600,7 @@ void irlap_send_rd_frame(struct irlap_cb *self) | |||
601 | struct sk_buff *tx_skb; | 600 | struct sk_buff *tx_skb; |
602 | __u8 *frame; | 601 | __u8 *frame; |
603 | 602 | ||
604 | tx_skb = dev_alloc_skb(16); | 603 | tx_skb = alloc_skb(16, GFP_ATOMIC); |
605 | if (!tx_skb) | 604 | if (!tx_skb) |
606 | return; | 605 | return; |
607 | 606 | ||
@@ -1215,7 +1214,7 @@ void irlap_send_test_frame(struct irlap_cb *self, __u8 caddr, __u32 daddr, | |||
1215 | struct test_frame *frame; | 1214 | struct test_frame *frame; |
1216 | __u8 *info; | 1215 | __u8 *info; |
1217 | 1216 | ||
1218 | tx_skb = dev_alloc_skb(cmd->len+sizeof(struct test_frame)); | 1217 | tx_skb = alloc_skb(cmd->len+sizeof(struct test_frame), GFP_ATOMIC); |
1219 | if (!tx_skb) | 1218 | if (!tx_skb) |
1220 | return; | 1219 | return; |
1221 | 1220 | ||