Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7bdcdc4d authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "regulator: core: fix debugfs file creation"

parents cfdadfe6 2bec52a4
Loading
Loading
Loading
Loading
+5 −3
Original line number Original line Diff line number Diff line
@@ -4184,6 +4184,7 @@ static void rdev_deinit_debugfs(struct regulator_dev *rdev)
		debugfs_remove_recursive(rdev->debugfs);
		debugfs_remove_recursive(rdev->debugfs);
		if (rdev->debug_consumer)
		if (rdev->debug_consumer)
			rdev->debug_consumer->debugfs = NULL;
			rdev->debug_consumer->debugfs = NULL;
		rdev->debugfs = NULL;
		regulator_put(rdev->debug_consumer);
		regulator_put(rdev->debug_consumer);
	}
	}
}
}
@@ -4225,7 +4226,8 @@ static void rdev_init_debugfs(struct regulator_dev *rdev)


	regulator = regulator_get(NULL, rdev_get_name(rdev));
	regulator = regulator_get(NULL, rdev_get_name(rdev));
	if (IS_ERR(regulator)) {
	if (IS_ERR(regulator)) {
		debugfs_remove_recursive(rdev->debugfs);
		rdev_deinit_debugfs(rdev);
		if (PTR_ERR(regulator) != -EPROBE_DEFER)
			rdev_err(rdev, "regulator get failed, ret=%ld\n",
			rdev_err(rdev, "regulator get failed, ret=%ld\n",
				 PTR_ERR(regulator));
				 PTR_ERR(regulator));
		return;
		return;