diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 68b616580533..62e4f3bd5783 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -3827,11 +3827,11 @@ void regulator_unregister(struct regulator_dev *rdev) WARN_ON(rdev->open_count); unset_regulator_supplies(rdev); list_del(&rdev->list); + mutex_unlock(®ulator_list_mutex); kfree(rdev->constraints); regulator_ena_gpio_free(rdev); of_node_put(rdev->dev.of_node); device_unregister(&rdev->dev); - mutex_unlock(®ulator_list_mutex); } EXPORT_SYMBOL_GPL(regulator_unregister);