diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 07982143ec18..9cf438a37eeb 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -1241,6 +1241,7 @@ static int set_supply(struct regulator_dev *rdev, rdev->supply = create_regulator(supply_rdev, &rdev->dev, "SUPPLY"); if (rdev->supply == NULL) { + module_put(supply_rdev->owner); err = -ENOMEM; return err; }