aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/wimax/i2400m/rx.c16
-rw-r--r--drivers/net/wimax/i2400m/usb-notif.c1
2 files changed, 5 insertions, 12 deletions
diff --git a/drivers/net/wimax/i2400m/rx.c b/drivers/net/wimax/i2400m/rx.c
index 37becfcc98f2..8077e6e35939 100644
--- a/drivers/net/wimax/i2400m/rx.c
+++ b/drivers/net/wimax/i2400m/rx.c
@@ -1351,24 +1351,18 @@ int i2400m_rx_setup(struct i2400m *i2400m)
1351 i2400m->rx_reorder = i2400m_rx_reorder_disabled? 0 : 1; 1351 i2400m->rx_reorder = i2400m_rx_reorder_disabled? 0 : 1;
1352 if (i2400m->rx_reorder) { 1352 if (i2400m->rx_reorder) {
1353 unsigned itr; 1353 unsigned itr;
1354 size_t size;
1355 struct i2400m_roq_log *rd; 1354 struct i2400m_roq_log *rd;
1356 1355
1357 result = -ENOMEM; 1356 result = -ENOMEM;
1358 1357
1359 size = sizeof(i2400m->rx_roq[0]) * (I2400M_RO_CIN + 1); 1358 i2400m->rx_roq = kcalloc(I2400M_RO_CIN + 1,
1360 i2400m->rx_roq = kzalloc(size, GFP_KERNEL); 1359 sizeof(i2400m->rx_roq[0]), GFP_KERNEL);
1361 if (i2400m->rx_roq == NULL) { 1360 if (i2400m->rx_roq == NULL)
1362 dev_err(dev, "RX: cannot allocate %zu bytes for "
1363 "reorder queues\n", size);
1364 goto error_roq_alloc; 1361 goto error_roq_alloc;
1365 }
1366 1362
1367 size = sizeof(*i2400m->rx_roq[0].log) * (I2400M_RO_CIN + 1); 1363 rd = kcalloc(I2400M_RO_CIN + 1, sizeof(*i2400m->rx_roq[0].log),
1368 rd = kzalloc(size, GFP_KERNEL); 1364 GFP_KERNEL);
1369 if (rd == NULL) { 1365 if (rd == NULL) {
1370 dev_err(dev, "RX: cannot allocate %zu bytes for "
1371 "reorder queues log areas\n", size);
1372 result = -ENOMEM; 1366 result = -ENOMEM;
1373 goto error_roq_log_alloc; 1367 goto error_roq_log_alloc;
1374 } 1368 }
diff --git a/drivers/net/wimax/i2400m/usb-notif.c b/drivers/net/wimax/i2400m/usb-notif.c
index d44b545f4082..fc1355d98bc6 100644
--- a/drivers/net/wimax/i2400m/usb-notif.c
+++ b/drivers/net/wimax/i2400m/usb-notif.c
@@ -199,7 +199,6 @@ int i2400mu_notification_setup(struct i2400mu *i2400mu)
199 d_fnstart(4, dev, "(i2400m %p)\n", i2400mu); 199 d_fnstart(4, dev, "(i2400m %p)\n", i2400mu);
200 buf = kmalloc(I2400MU_MAX_NOTIFICATION_LEN, GFP_KERNEL | GFP_DMA); 200 buf = kmalloc(I2400MU_MAX_NOTIFICATION_LEN, GFP_KERNEL | GFP_DMA);
201 if (buf == NULL) { 201 if (buf == NULL) {
202 dev_err(dev, "notification: buffer allocation failed\n");
203 ret = -ENOMEM; 202 ret = -ENOMEM;
204 goto error_buf_alloc; 203 goto error_buf_alloc;
205 } 204 }