diff options
Diffstat (limited to 'drivers/net/wimax')
-rw-r--r-- | drivers/net/wimax/i2400m/rx.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/net/wimax/i2400m/rx.c b/drivers/net/wimax/i2400m/rx.c index 66f968a24d49..0004c686ac68 100644 --- a/drivers/net/wimax/i2400m/rx.c +++ b/drivers/net/wimax/i2400m/rx.c | |||
@@ -300,17 +300,16 @@ void i2400m_rx_ctl_ack(struct i2400m *i2400m, | |||
300 | d_printf(1, dev, "Huh? waiter for command reply cancelled\n"); | 300 | d_printf(1, dev, "Huh? waiter for command reply cancelled\n"); |
301 | goto error_waiter_cancelled; | 301 | goto error_waiter_cancelled; |
302 | } | 302 | } |
303 | if (ack_skb == NULL) { | 303 | if (IS_ERR(ack_skb)) |
304 | dev_err(dev, "CMD/GET/SET ack: cannot allocate SKB\n"); | 304 | dev_err(dev, "CMD/GET/SET ack: cannot allocate SKB\n"); |
305 | i2400m->ack_skb = ERR_PTR(-ENOMEM); | 305 | i2400m->ack_skb = ack_skb; |
306 | } else | ||
307 | i2400m->ack_skb = ack_skb; | ||
308 | spin_unlock_irqrestore(&i2400m->rx_lock, flags); | 306 | spin_unlock_irqrestore(&i2400m->rx_lock, flags); |
309 | complete(&i2400m->msg_completion); | 307 | complete(&i2400m->msg_completion); |
310 | return; | 308 | return; |
311 | 309 | ||
312 | error_waiter_cancelled: | 310 | error_waiter_cancelled: |
313 | kfree_skb(ack_skb); | 311 | if (!IS_ERR(ack_skb)) |
312 | kfree_skb(ack_skb); | ||
314 | error_no_waiter: | 313 | error_no_waiter: |
315 | spin_unlock_irqrestore(&i2400m->rx_lock, flags); | 314 | spin_unlock_irqrestore(&i2400m->rx_lock, flags); |
316 | return; | 315 | return; |