summaryrefslogtreecommitdiffstats
path: root/drivers/dpll
diff options
context:
space:
mode:
authorJiri Pirko <jiri@nvidia.com>2024-01-30 16:58:14 +0100
committerJakub Kicinski <kuba@kernel.org>2024-01-31 22:32:49 +0100
commite7f8df0e81bf73ab6dc6ac1dc01273fa06564119 (patch)
treeee8416e2d11bd22b8bf20dff75c9b5f8d717ebc7 /drivers/dpll
parentselftests/net: calibrate txtimestamp (diff)
downloadlinux-e7f8df0e81bf73ab6dc6ac1dc01273fa06564119.tar.xz
linux-e7f8df0e81bf73ab6dc6ac1dc01273fa06564119.zip
dpll: move xa_erase() call in to match dpll_pin_alloc() error path order
This is cosmetics. Move the call of xa_erase() in dpll_pin_put() so the order of cleanup calls matches the error path of dpll_pin_alloc(). Signed-off-by: Jiri Pirko <jiri@nvidia.com> Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev> Link: https://lore.kernel.org/r/20240130155814.268622-1-jiri@resnulli.us Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/dpll')
-rw-r--r--drivers/dpll/dpll_core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/dpll/dpll_core.c b/drivers/dpll/dpll_core.c
index 5152bd1b0daf..61e5c607a72f 100644
--- a/drivers/dpll/dpll_core.c
+++ b/drivers/dpll/dpll_core.c
@@ -560,9 +560,9 @@ void dpll_pin_put(struct dpll_pin *pin)
{
mutex_lock(&dpll_lock);
if (refcount_dec_and_test(&pin->refcount)) {
+ xa_erase(&dpll_pin_xa, pin->id);
xa_destroy(&pin->dpll_refs);
xa_destroy(&pin->parent_refs);
- xa_erase(&dpll_pin_xa, pin->id);
dpll_pin_prop_free(&pin->prop);
kfree(pin);
}