Re: subdevice config into pointer (was Re: [PATCH 1/4] v4l2: device_register_subdev_nodes: allow calling multiple times)

Pavel Machek
2017-03-02T21:27:57Z

[-- Attachment #1: Type: text/plain, Size: 768 bytes --]

Hi!

> > > static int isp_fwnode_parse(struct device *dev, struct fwnode_handle
> > > *fwn,
> > >
> > > struct isp_async_subdev *isd)
> > >
> > > {
> > >
> > > - struct isp_bus_cfg *buscfg = &isd->bus;
> > > + struct isp_bus_cfg *buscfg;
> > >
> > > struct v4l2_fwnode_endpoint vfwn;
> > > unsigned int i;
> > > int ret;
> > > bool csi1 = false;
> > >
> > > + buscfg = devm_kzalloc(dev, sizeof(*isd->bus), GFP_KERNEL);
>
> Given that you recently get rid of devm_kzalloc() in the driver, let's not
> introduce a new one here.

What is wrong with devm_kzalloc()?