Unverified Commit 83980813 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!7734 mlxsw: spectrum_acl_tcam: Fix incorrect list API usage

parents c55871f8 d2b0edd3
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -1263,6 +1263,9 @@ mlxsw_sp_acl_tcam_vchunk_migrate_one(struct mlxsw_sp *mlxsw_sp,
		return 0;
	}

	if (list_empty(&vchunk->ventry_list))
		goto out;

	/* If the migration got interrupted, we have the ventry to start from
	 * stored in context.
	 */
@@ -1312,6 +1315,7 @@ mlxsw_sp_acl_tcam_vchunk_migrate_one(struct mlxsw_sp *mlxsw_sp,
		}
	}

out:
	mlxsw_sp_acl_tcam_vchunk_migrate_end(mlxsw_sp, vchunk, ctx);
	return 0;
}
@@ -1325,6 +1329,9 @@ mlxsw_sp_acl_tcam_vchunk_migrate_all(struct mlxsw_sp *mlxsw_sp,
	struct mlxsw_sp_acl_tcam_vchunk *vchunk;
	int err;

	if (list_empty(&vregion->vchunk_list))
		return 0;

	/* If the migration got interrupted, we have the vchunk
	 * we are working on stored in context.
	 */