]> git.baikalelectronics.ru Git - kernel.git/commit
ethtool: fec_prepare_data() - jump to error handling
authorJakub Kicinski <kuba@kernel.org>
Thu, 15 Apr 2021 22:53:14 +0000 (15:53 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 16 Apr 2021 00:08:29 +0000 (17:08 -0700)
commit2bdb7fc532ae690be58e4405967288559c982694
tree36923de86a7e74cb33d8f22426c323b0a105546d
parentf0a1bcf28e8ae5437a8bcfe4880dacb6b0130820
ethtool: fec_prepare_data() - jump to error handling

Refactor fec_prepare_data() a little bit to skip the body
of the function and exit on error. Currently the code
depends on the fact that we only have one call which
may fail between ethnl_ops_begin() and ethnl_ops_complete()
and simply saves the error code. This will get hairy with
the stats also being queried.

No functional changes.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ethtool/fec.c