]> git.baikalelectronics.ru Git - kernel.git/commit
net: enetc: catch negative return code from enetc_pf_to_port()
authorVladimir Oltean <vladimir.oltean@nxp.com>
Mon, 31 May 2021 16:17:07 +0000 (19:17 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 1 Jun 2021 22:16:33 +0000 (15:16 -0700)
commit5dd04835cde253d738c639c6818d37587d09e1da
tree7ddba133ddd4ee016be01a147eb66dce40661799
parentdff6f6955590c1f091924724bb9dbec15e237808
net: enetc: catch negative return code from enetc_pf_to_port()

After the refactoring introduced in commit cf73ed9d7458 ("net: enetc:
create a common enetc_pf_to_port helper"), enetc_pf_to_port was coded up
to return -1 in case the passed PCIe device does not have a recognized
BDF.

Make sure the -1 value is checked by the callers, to appease static
checkers.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/enetc/enetc_qos.c