[PATCH openEuler-5.10 075/119] mlxsw: Verify the accessed index doesn't exceed the array length