Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9eca4993 authored by Aaro Koskinen's avatar Aaro Koskinen Committed by Greg Kroah-Hartman
Browse files

staging: octeon: check for pow0 before calling interface helper



Check for pow0 port first before calling the interface helper. This
avoids the following error log when setting up pow0 interface:

	cvmx_helper_get_interface_num: Illegal IPD port number

Signed-off-by: default avatarAaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0ad1ed99
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -32,12 +32,13 @@ static inline void *cvm_oct_get_buffer_ptr(union cvmx_buf_ptr packet_ptr)
 */
static inline int INTERFACE(int ipd_port)
{
	int interface = cvmx_helper_get_interface_num(ipd_port);
	int interface;

	if (ipd_port == CVMX_PIP_NUM_INPUT_PORTS)
		return 10;
	interface = cvmx_helper_get_interface_num(ipd_port);
	if (interface >= 0)
		return interface;
	else if (ipd_port == CVMX_PIP_NUM_INPUT_PORTS)
		return 10;
	panic("Illegal ipd_port %d passed to INTERFACE\n", ipd_port);
}