Edward Cree 2adc6edcae ethtool: fix error handling in ethtool_phys_id
If ops->set_phys_id() returned an error, previously we would only break
 out of the inner loop, which neither stopped the outer loop nor returned
 the error to the user (since 'rc' would be overwritten on the next pass
 through the loop).
Thus, rewrite it to use a single loop, so that the break does the right
 thing.  Use u64 for 'count' and 'i' to prevent overflow in case of
 (unreasonably) large values of id.data and n.

Signed-off-by: Edward Cree <ecree@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-09-03 14:59:51 -07:00
..
2020-07-10 13:54:00 -07:00
2020-07-10 13:54:00 -07:00
2020-03-29 22:32:36 -07:00
2020-06-29 17:45:02 -07:00
2020-07-10 13:54:00 -07:00
2020-07-10 13:54:00 -07:00
2020-03-29 22:32:36 -07:00
2020-07-10 13:54:00 -07:00