Re: [PATCH 2/2] regulator: Add support for DA9121 regulator

From: Mark Brown
Date: Thu Oct 29 2020 - 11:28:58 EST


On Thu, Oct 29, 2020 at 04:15:38PM +0100, Vincent Whitchurch wrote:

> + config.init_data = of_get_regulator_init_data(dev, dev->of_node, &da9121_reg);
> + if (!config.init_data)
> + return -ENOMEM;

Don't do this, the core can do the DT bit for you and there is no reason
not to register the device if there are no constraints. -ENOMEM would
also be the wrong error code here.

Attachment: signature.asc
Description: PGP signature