]> git.baikalelectronics.ru Git - kernel.git/commit
ethtool: fix error handling in linkstate_prepare_data()
authorMichal Kubecek <mkubecek@suse.cz>
Wed, 24 Jun 2020 22:09:08 +0000 (00:09 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 25 Jun 2020 23:17:16 +0000 (16:17 -0700)
commit29c0fa62459c2397ddf36b8e3c9572831ce03842
tree35fbaa75e149c650d646ea595de6a0a76d733bb6
parenta1b78151acf60e884cd0a3b6052aaeb169f524bd
ethtool: fix error handling in linkstate_prepare_data()

When getting SQI or maximum SQI value fails in linkstate_prepare_data(), we
must not return without calling ethnl_ops_complete(dev) as that could
result in imbalance between ethtool_ops ->begin() and ->complete() calls.

Fixes: be7f318f91b5 ("ethtool: provide UAPI for PHY Signal Quality Index (SQI)")
Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ethtool/linkstate.c