net/mlx5: fix sample register error flow