Re: [PATCH v2 1/7] mfd: Add support for DA9150 combined charger & fuel-gauge device

Lee Jones
2014-09-10T09:51:30Z

On Tue, 09 Sep 2014, Opensource [Adam Thomson] wrote:
> On August 28, 2014 12:47, Varka Bhadram wrote:
>
> > On 08/28/2014 04:18 PM, Adam Thomson wrote:
> >
> > (...)
> >
> > > +static int da9150_probe(struct i2c_client *client,
> > > + const struct i2c_device_id *id)
> > > +{
> > > + struct da9150 *da9150;
> > > + int ret;
> > > +
> > > + da9150 = devm_kzalloc(&client->dev, sizeof(struct da9150), GFP_KERNEL);
> > > + if (da9150 == NULL)
> > > + return -ENOMEM;
> >
> > da9150 = devm_kzalloc(&client->dev, sizeof(*da9150), GFP_KERNEL);
> > if (!da9150)
> > return -ENOMEM;
>
> Ok, no real difference, but can change it.

Not functionally, but we like to do things as succinctly as possible.

--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog