Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F103689358
D5772.id14707.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D5772.id14707.diff
View Options
Index: sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c
===================================================================
--- sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c
+++ sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c
@@ -722,8 +722,6 @@
u8 *dmac;
g = malloc(9 * sizeof(*g), M_MLX5EN, M_WAITOK | M_ZERO);
- if (g == NULL)
- return (-ENOMEM);
g[0].log_sz = 2;
g[0].match_criteria_enable = MLX5_MATCH_OUTER_HEADERS;
@@ -807,8 +805,6 @@
struct mlx5_flow_table_group *g;
g = malloc(2 * sizeof(*g), M_MLX5EN, M_WAITOK | M_ZERO);
- if (g == NULL)
- return (-ENOMEM);
g[0].log_sz = 12;
g[0].match_criteria_enable = MLX5_MATCH_OUTER_HEADERS;
Index: sys/dev/mlx5/mlx5_en/mlx5_en_main.c
===================================================================
--- sys/dev/mlx5/mlx5_en/mlx5_en_main.c
+++ sys/dev/mlx5/mlx5_en/mlx5_en_main.c
@@ -667,10 +667,6 @@
wq_sz = mlx5_wq_ll_get_size(&rq->wq);
rq->mbuf = malloc(wq_sz * sizeof(rq->mbuf[0]), M_MLX5EN, M_WAITOK | M_ZERO);
- if (rq->mbuf == NULL) {
- err = -ENOMEM;
- goto err_rq_wq_destroy;
- }
for (i = 0; i != wq_sz; i++) {
struct mlx5e_rx_wqe *wqe = mlx5_wq_ll_get_wqe(&rq->wq, i);
uint32_t byte_count = rq->wqe_sz - MLX5E_NET_IP_ALIGN;
@@ -921,8 +917,6 @@
int x;
sq->mbuf = malloc(wq_sz * sizeof(sq->mbuf[0]), M_MLX5EN, M_WAITOK | M_ZERO);
- if (sq->mbuf == NULL)
- return (-ENOMEM);
/* Create DMA descriptor MAPs */
for (x = 0; x != wq_sz; x++) {
@@ -1475,9 +1469,6 @@
int err;
c = malloc(sizeof(*c), M_MLX5EN, M_WAITOK | M_ZERO);
- if (c == NULL)
- return (-ENOMEM);
-
c->priv = priv;
c->ix = ix;
c->cpu = 0;
@@ -1679,8 +1670,6 @@
priv->channel = malloc(priv->params.num_channels *
sizeof(struct mlx5e_channel *), M_MLX5EN, M_WAITOK | M_ZERO);
- if (priv->channel == NULL)
- return (-ENOMEM);
mlx5e_build_channel_param(priv, &cparam);
for (i = 0; i < priv->params.num_channels; i++) {
@@ -2840,10 +2829,6 @@
return (NULL);
}
priv = malloc(sizeof(*priv), M_MLX5EN, M_WAITOK | M_ZERO);
- if (priv == NULL) {
- mlx5_core_err(mdev, "malloc() failed\n");
- return (NULL);
- }
mlx5e_priv_mtx_init(priv);
ifp = priv->ifp = if_alloc(IFT_ETHER);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 29, 1:43 AM (20 h, 49 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14919905
Default Alt Text
D5772.id14707.diff (2 KB)
Attached To
Mode
D5772: Remove useless NULL checks.
Attached
Detach File
Event Timeline
Log In to Comment