|
@@ -3365,7 +3365,7 @@ regulator_register(const struct regulator_desc *regulator_desc,
|
|
|
if (ret != 0) {
|
|
|
rdev_err(rdev, "Failed to request enable GPIO%d: %d\n",
|
|
|
config->ena_gpio, ret);
|
|
|
- goto clean;
|
|
|
+ goto wash;
|
|
|
}
|
|
|
|
|
|
rdev->ena_gpio = config->ena_gpio;
|
|
@@ -3449,6 +3449,7 @@ scrub:
|
|
|
if (rdev->ena_gpio)
|
|
|
gpio_free(rdev->ena_gpio);
|
|
|
kfree(rdev->constraints);
|
|
|
+wash:
|
|
|
device_unregister(&rdev->dev);
|
|
|
/* device core frees rdev */
|
|
|
rdev = ERR_PTR(ret);
|