net/mlx4_core: Check port out-of-range before using in mlx4_slave_cap