[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201029152843.GC5042@sirena.org.uk>
Date: Thu, 29 Oct 2020 15:28:43 +0000
From: Mark Brown <broonie@...nel.org>
To: Vincent Whitchurch <vincent.whitchurch@...s.com>
Cc: lgirdwood@...il.com, support.opensource@...semi.com,
kernel@...s.com, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, robh+dt@...nel.org
Subject: Re: [PATCH 2/2] regulator: Add support for DA9121 regulator
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.
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists