Merge tag 'v5.7-rc7' into perf/core, to pick up fixes
[linux-2.6-microblaze.git] / drivers / net / ethernet / mellanox / mlxsw / spectrum_mr_tcam.c
index 346f4a5..221aa6a 100644 (file)
@@ -199,8 +199,8 @@ mlxsw_sp_mr_tcam_afa_block_create(struct mlxsw_sp *mlxsw_sp,
        int err;
 
        afa_block = mlxsw_afa_block_create(mlxsw_sp->afa);
-       if (!afa_block)
-               return ERR_PTR(-ENOMEM);
+       if (IS_ERR(afa_block))
+               return afa_block;
 
        err = mlxsw_afa_block_append_allocated_counter(afa_block,
                                                       counter_index);