lkml.org 
[lkml]   [2014]   [Nov]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 2/4] regulator: Set ena_gpio_initialized in regulator drivers
Hi,

Sorry for the delay, holiday and so on.

On Mon, Oct 13, 2014 at 04:42:35PM +0200, Mark Brown wrote:
> On Wed, Oct 08, 2014 at 03:47:06PM +0200, Markus Pargmann wrote:
>
> > --- a/drivers/regulator/max8952.c
> > +++ b/drivers/regulator/max8952.c
> > @@ -225,6 +225,8 @@ static int max8952_pmic_probe(struct i2c_client *client,
> > config.of_node = client->dev.of_node;
> >
> > config.ena_gpio = pdata->gpio_en;
> > + if (!pdata)
> > + config.ena_gpio_initialized = true;
>
> This looks wrong, we're checking for pdata being non-NULL immediately
> after dereferencing pdata.

Yes this is wrong, I changed it to check for client->dev.of_node instead.

Thanks,

Markus

--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2014-11-03 14:41    [W:0.077 / U:0.932 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site