Aleksey Makarov
fa1a6c93af
net: thunderx: check if memory allocation was successful
This fixes a coccinelle warning:
coccinelle warnings: (new ones prefixed by >>)
>> drivers/net/ethernet/cavium/thunder/nicvf_queues.c:360:1-11: alloc
>> with no test, possible model on line 367
vim +360 drivers/net/ethernet/cavium/thunder/nicvf_queues.c
354 err = nicvf_alloc_q_desc_mem(nic, &sq->dmem, q_len,
SND_QUEUE_DESC_SIZE,
355 NICVF_SQ_BASE_ALIGN_BYTES);
356 if (err)
357 return err;
358
359 sq->desc = sq->dmem.base;
> 360 sq->skbuff = kcalloc(q_len, sizeof(u64), GFP_ATOMIC);
361 sq->head = 0;
362 sq->tail = 0;
363 atomic_set(&sq->free_cnt, q_len - 1);
364 sq->thresh = SND_QUEUE_THRESH;
365
366 /* Preallocate memory for TSO segment's header */
> 367 sq->tso_hdrs = dma_alloc_coherent(&nic->pdev->dev,
368 q_len *
TSO_HEADER_SIZE,
369 &sq->tso_hdrs_phys,
GFP_KERNEL);
370 if (!sq->tso_hdrs)
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Aleksey Makarov <aleksey.makarov@caviumnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-06-02 12:49:33 -07:00
..
2015-05-15 00:31:23 +02:00
2015-04-02 10:03:55 +01:00
2015-05-11 10:54:20 -07:00
2015-05-25 16:34:35 -04:00
2015-04-26 17:22:07 -07:00
2015-05-09 16:28:07 +03:00
2015-05-23 01:22:35 -04:00
2015-05-30 23:26:45 -07:00
2015-05-26 16:46:52 +02:00
2015-05-05 19:37:22 -05:00
2015-05-30 17:04:36 -07:00
2015-04-24 08:23:45 -07:00
2015-04-15 23:02:24 +02:00
2015-04-29 15:19:21 +02:00
2015-04-26 13:51:05 -07:00
2015-03-31 13:17:15 +09:00
2015-04-29 16:47:57 +05:30
2015-04-21 14:47:16 +05:30
2015-04-27 11:06:05 +09:00
2015-05-14 18:02:15 -07:00
2015-05-12 13:49:13 +02:00
2015-05-29 11:13:52 +10:00
2015-05-21 17:23:11 -07:00
2015-04-05 14:45:27 +02:00
2015-04-03 16:20:12 +02:00
2015-05-29 17:47:42 -07:00
2015-04-21 09:42:58 -07:00
2015-04-26 17:44:09 -07:00
2015-05-11 10:54:20 -07:00
2015-04-14 20:21:54 -07:00
2015-05-13 11:51:14 -07:00
2015-06-01 22:51:30 -07:00
2015-05-22 14:49:55 -07:00
2015-05-11 18:36:20 +02:00
2015-05-20 22:13:37 +02:00
2015-05-31 21:36:37 -07:00
2015-04-18 08:22:10 -04:00
2015-05-27 09:57:21 -07:00
2015-04-07 13:25:14 +10:00
2015-04-03 16:15:30 +02:00
2015-05-29 14:39:24 -07:00
2015-05-05 08:42:06 -07:00
2015-04-22 09:18:17 -07:00
2015-04-17 09:04:09 -04:00
2015-06-01 22:51:30 -07:00
2015-04-21 09:42:58 -07:00
2015-05-18 09:04:42 +02:00
2015-05-18 10:01:54 -07:00
2015-06-02 12:49:33 -07:00
2015-04-07 12:05:12 +02:00
2015-05-14 13:40:55 -04:00
2015-04-26 17:22:07 -07:00
2015-04-24 13:45:54 +02:00
2015-04-16 14:01:03 -05:00
2015-04-22 09:04:39 -07:00
2015-04-13 17:07:21 -07:00
2015-05-19 11:40:52 +02:00
2015-05-20 02:18:12 -07:00
2015-04-14 20:21:54 -07:00
2015-05-01 23:01:48 +02:00
2015-04-15 23:06:16 +02:00
2015-03-26 15:23:17 +11:00
2015-03-31 12:01:19 -04:00
2015-05-19 16:07:40 +02:00
2015-05-27 13:34:15 +01:00
2015-05-14 17:55:51 -07:00
2015-05-23 01:22:35 -04:00
2015-04-15 16:35:23 -07:00
2015-06-01 22:51:30 -07:00
2015-04-27 13:08:14 +09:00
2015-04-14 00:43:28 +02:00
2015-05-11 17:29:49 +01:00
2015-04-03 16:15:30 +02:00
2015-05-20 16:36:06 +03:00
2015-05-31 17:34:26 -07:00
2015-06-01 22:51:30 -07:00
2015-05-19 08:12:27 +08:00
2015-05-26 16:46:52 +02:00
2015-04-03 16:04:21 +02:00
2015-05-14 12:43:36 -07:00
2015-05-01 16:31:41 -06:00
2015-06-01 22:51:30 -07:00
2015-05-26 08:44:59 +01:00
2015-04-15 12:41:14 +09:30
2015-03-25 12:25:29 +01:00
2015-04-22 11:22:55 -07:00
2015-05-19 19:55:36 +01:00
2015-04-03 16:17:04 +02:00