staging: octeon: validate interface before calling INDEX

Some helper functions call INDEX before checking if the interface is
valid. Since pow0 is not a real interface, we get the following errors:

	cvmx_helper_get_interface_index_num: Illegal IPD port number

Fix by using INDEX only when needed with real interfaces.

Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Aaro Koskinen 2016-06-29 15:20:44 +03:00 • committed by Greg Kroah-Hartman
commit 0ad1ed99d6