Skip to content

Commit

Permalink
dpll: move xa_erase() call in to match dpll_pin_alloc() error path order
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jiri Pirko authored and Jakub Kicinski committed Jan 31, 2024
1 parent 5264ab6 commit e7f8df0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/dpll/dpll_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit e7f8df0

Please sign in to comment.