Simon Horman 5692dbb56e nfp: prevent theoretical buffer overrun in nfp_eth_read_ports
Prevent theoretical buffer overrun by returning an error if
the number of entries returned by the firmware does not match those
present.

Also use a common handling error path.

Found by inspection.

Signed-off-by: Simon Horman <simon.horman@netronome.com>
Tested-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-03-09 16:39:58 -08:00
..
2017-02-27 18:43:47 -08:00
2017-02-22 11:44:32 -08:00
2017-02-11 20:59:41 -05:00
2017-03-01 09:58:31 -08:00
2017-02-27 18:43:47 -08:00
2017-02-11 20:59:41 -05:00
2017-03-01 09:58:31 -08:00