]> git.ipfire.org Git - thirdparty/linux.git/commit
ethtool: linkstate: fix unbalanced ethnl_ops_complete() on PHY lookup error
authorJakub Kicinski <kuba@kernel.org>
Tue, 26 May 2026 15:35:26 +0000 (08:35 -0700)
committerJakub Kicinski <kuba@kernel.org>
Thu, 28 May 2026 00:42:08 +0000 (17:42 -0700)
commit596c51ed9e125b12c4d85b4530dfd4c7847634b7
treee155e9b929f152a51270ac37adc16af61f353a57
parenta888bbd43940cada72f7686337741ce86d1cf869
ethtool: linkstate: fix unbalanced ethnl_ops_complete() on PHY lookup error

linkstate_prepare_data() calls ethnl_req_get_phydev() before
ethnl_ops_begin(), but routes its error path through "goto out"
which calls ethnl_ops_complete().

Fixes: fe55b1d401c6 ("ethtool: linkstate: migrate linkstate functions to support multi-PHY setups")
Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Link: https://patch.msgid.link/20260526153533.2779187-4-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ethtool/linkstate.c