app/testpmd: fix invalid port detaching
app/testpmd: fix invalid port detaching

The port was not validated before detaching.

Ignore port detach operation when the port is not valid.

Fixes: f8e5baa2662d ("app/testpmd: check not detaching device twice")
Cc: stable@dpdk.org

Signed-off-by: Matan Azrad <6969f5f553ad7652679a585a85d7321babc90464@mellanox.com>
Acked-by: Bernard Iremonger <233eeff376ad0c06f66f06c5522ea3c4feb30d3b@intel.com>

john-mcnamara-intel/dpdk,john-mcnamara-intel/dpdk,john-mcnamara-intel/dpdk,john-mcnamara-intel/dpdk