From: Roi Dayan <r...@mellanox.com>

This makes it more readable that rule is being used to return an err.

Signed-off-by: Roi Dayan <r...@mellanox.com>
Signed-off-by: Saeed Mahameed <sae...@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c 
b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
index 05e7a5112b74..29b86232f13a 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
@@ -1825,7 +1825,7 @@ _mlx5_add_flow_rules(struct mlx5_flow_table *ft,
 
        g = alloc_auto_flow_group(ft, spec);
        if (IS_ERR(g)) {
-               rule = (void *)g;
+               rule = ERR_CAST(g);
                up_write_ref_node(&ft->node);
                return rule;
        }
-- 
2.17.0

Reply via email to