diff options
author | Maxime Chevallier <maxime.chevallier@bootlin.com> | 2025-04-07 15:05:10 +0200 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2025-04-08 15:34:15 +0200 |
commit | 4f038a6a02d20859a3479293cbf172b0f14cbdd6 (patch) | |
tree | 959dc7b77133004a8721e709f341fa3d88441c75 /rust/helpers/workqueue.c | |
parent | 369609fc6272c2f6ad666ba4fd913f3baf32908f (diff) | |
download | linux-4f038a6a02d20859a3479293cbf172b0f14cbdd6.tar.gz linux-4f038a6a02d20859a3479293cbf172b0f14cbdd6.tar.bz2 linux-4f038a6a02d20859a3479293cbf172b0f14cbdd6.zip |
net: ethtool: Don't call .cleanup_data when prepare_data fails
There's a consistent pattern where the .cleanup_data() callback is
called when .prepare_data() fails, when it should really be called to
clean after a successful .prepare_data() as per the documentation.
Rewrite the error-handling paths to make sure we don't cleanup
un-prepared data.
Fixes: c781ff12a2f3 ("ethtool: Allow network drivers to dump arbitrary EEPROM data")
Reviewed-by: Kory Maincent <kory.maincent@bootlin.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Reviewed-by: Michal Kubecek <mkubecek@suse.cz>
Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Link: https://patch.msgid.link/20250407130511.75621-1-maxime.chevallier@bootlin.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'rust/helpers/workqueue.c')
0 files changed, 0 insertions, 0 deletions