diff options
author | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2006-09-17 12:17:19 -0400 |
---|---|---|
committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2006-09-17 12:19:31 -0400 |
commit | 9b4f2e9576658c4e52d95dc8d309f51b2e2db096 (patch) | |
tree | 7b1902b0f931783fccc6fee45c6f9c16b4fde5ce /net/lapb/lapb_iface.c | |
parent | 3c6c65f5ed5a6d307bd607aecd06d658c0934d88 (diff) | |
parent | 803db244b9f71102e366fd689000c1417b9a7508 (diff) |
ieee1394: merge from Linus
Conflicts: drivers/ieee1394/hosts.c
Patch "lockdep: annotate ieee1394 skb-queue-head locking" was meddling
with patch "ieee1394: fix kerneldoc of hpsb_alloc_host".
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'net/lapb/lapb_iface.c')
-rw-r--r-- | net/lapb/lapb_iface.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/net/lapb/lapb_iface.c b/net/lapb/lapb_iface.c index aea6616cea3d..7e6bc41eeb21 100644 --- a/net/lapb/lapb_iface.c +++ b/net/lapb/lapb_iface.c | |||
@@ -115,14 +115,12 @@ static struct lapb_cb *lapb_devtostruct(struct net_device *dev) | |||
115 | */ | 115 | */ |
116 | static struct lapb_cb *lapb_create_cb(void) | 116 | static struct lapb_cb *lapb_create_cb(void) |
117 | { | 117 | { |
118 | struct lapb_cb *lapb = kmalloc(sizeof(*lapb), GFP_ATOMIC); | 118 | struct lapb_cb *lapb = kzalloc(sizeof(*lapb), GFP_ATOMIC); |
119 | 119 | ||
120 | 120 | ||
121 | if (!lapb) | 121 | if (!lapb) |
122 | goto out; | 122 | goto out; |
123 | 123 | ||
124 | memset(lapb, 0x00, sizeof(*lapb)); | ||
125 | |||
126 | skb_queue_head_init(&lapb->write_queue); | 124 | skb_queue_head_init(&lapb->write_queue); |
127 | skb_queue_head_init(&lapb->ack_queue); | 125 | skb_queue_head_init(&lapb->ack_queue); |
128 | 126 | ||
@@ -240,11 +238,13 @@ int lapb_setparms(struct net_device *dev, struct lapb_parms_struct *parms) | |||
240 | goto out_put; | 238 | goto out_put; |
241 | 239 | ||
242 | if (lapb->state == LAPB_STATE_0) { | 240 | if (lapb->state == LAPB_STATE_0) { |
243 | if (((parms->mode & LAPB_EXTENDED) && | 241 | if (parms->mode & LAPB_EXTENDED) { |
244 | (parms->window < 1 || parms->window > 127)) || | 242 | if (parms->window < 1 || parms->window > 127) |
245 | (parms->window < 1 || parms->window > 7)) | 243 | goto out_put; |
246 | goto out_put; | 244 | } else { |
247 | 245 | if (parms->window < 1 || parms->window > 7) | |
246 | goto out_put; | ||
247 | } | ||
248 | lapb->mode = parms->mode; | 248 | lapb->mode = parms->mode; |
249 | lapb->window = parms->window; | 249 | lapb->window = parms->window; |
250 | } | 250 | } |