diff options
-rw-r--r-- | drivers/regulator/core.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index f6a95f72af18..34d3d8281906 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -5725,15 +5725,11 @@ wash: mutex_lock(®ulator_list_mutex); regulator_ena_gpio_free(rdev); mutex_unlock(®ulator_list_mutex); - put_device(&rdev->dev); - rdev = NULL; clean: if (dangling_of_gpiod) gpiod_put(config->ena_gpiod); - if (rdev && rdev->dev.of_node) - of_node_put(rdev->dev.of_node); - kfree(rdev); kfree(config); + put_device(&rdev->dev); rinse: if (dangling_cfg_gpiod) gpiod_put(cfg->ena_gpiod); |