|
@@ -1105,6 +1105,9 @@ static int set_supply(struct regulator_dev *rdev,
|
|
|
|
|
|
rdev_info(rdev, "supplied by %s\n", rdev_get_name(supply_rdev));
|
|
rdev_info(rdev, "supplied by %s\n", rdev_get_name(supply_rdev));
|
|
|
|
|
|
|
|
+ if (!try_module_get(supply_rdev->owner))
|
|
|
|
+ return -ENODEV;
|
|
|
|
+
|
|
rdev->supply = create_regulator(supply_rdev, &rdev->dev, "SUPPLY");
|
|
rdev->supply = create_regulator(supply_rdev, &rdev->dev, "SUPPLY");
|
|
if (rdev->supply == NULL) {
|
|
if (rdev->supply == NULL) {
|
|
err = -ENOMEM;
|
|
err = -ENOMEM;
|