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

Commit f25e0b4f authored by Mark Brown's avatar Mark Brown Committed by Liam Girdwood
Browse files

regulator: Check for constraints in regulator_init_complete()

parent b39480ac
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2409,14 +2409,14 @@ static int __init regulator_init_complete(void)
		ops = rdev->desc->ops;
		c = rdev->constraints;

		if (c->name)
		if (c && c->name)
			name = c->name;
		else if (rdev->desc->name)
			name = rdev->desc->name;
		else
			name = "regulator";

		if (!ops->disable || c->always_on)
		if (!ops->disable || (c && c->always_on))
			continue;

		mutex_lock(&rdev->mutex);