diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 6f7d411b048b4e677a5885fdeb4311b345eb17c0..6cb9d399affdd587d97323b6c0ca1889abfb3ed8 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -1282,6 +1282,7 @@ static struct regulator *_regulator_get(struct device *dev, const char *id, if (regulator == NULL) { regulator = ERR_PTR(-ENOMEM); module_put(rdev->owner); + goto out; } rdev->open_count++;