lkml.org 
[lkml]   [2020]   [Oct]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2020-10-29 16:29    [W:0.044 / U:0.740 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site