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

Skip to content
Commit cde72ccf authored by Takashi Iwai's avatar Takashi Iwai Committed by Mark Brown
Browse files

regulator: Fix regression due to NULL constraints check



The commit [39f802d6: 'regulator: Build sysfs entries with static
attribute groups'] converted the sysfs entry creation to static
attribute groups, but this resulted in a regression due to the NULL
check of rdev->constraints.  At the point where the device is
registered, rdev->constraints isn't set, so the attributes depending
on it are missing.

We may fix it by shuffling the code order in regulator_register(), but
a quicker fix is to just remove this NULL check.  rdev->constraints is
in anyway always set to non-NULL in set_machine_constraints(), thus
the check there is basically superfluous.

Fixes: 39f802d6 ('regulator: Build sysfs entries with static attribute groups')
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Reportded-by: default avatarSteve Twiss <stwiss.opensource@diasemi.com>
Tested-by: default avatarSteve Twiss <stwiss.opensource@diasemi.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent c517d838
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment