[PATCH 5/6] regulator: anatop-regulator: make regulator-name using optionally

Mark Brown broonie at kernel.org
Tue Apr 11 16:38:18 EDT 2017


On Wed, Apr 12, 2017 at 09:58:46AM +0800, Dong Aisheng wrote:
> rdesc->name/regulator-name is optional according to standard regulator
> binding doc. Use it conditionally to avoid a kernel NULL point crash.

It is optional in the standard binding because it is used to override
the name statically provided in the driver for the device.  Since the
anatop regulator is completely dynamic (there's no static list of
regulators in the device) it's mandatory for anatop regulators - you
should improve the error handling instead to detect a missing name.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20170411/ab02c8e2/attachment.sig>


More information about the linux-arm-kernel mailing list