> > +static int dfl_devs_init(struct platform_device *pdev)
> > +{
> > +   struct dfl_feature_platform_data *pdata = dev_get_platdata(&pdev->dev);
> > +   struct dfl_feature *feature;
> > +   struct dfl_device *dfl_dev;
> > +
> > +   dfl_fpga_dev_for_each_feature(pdata, feature) {
> > +           if (feature->ioaddr || feature->priv)
> > +                   continue;
> > +
> > +           dfl_dev = dfl_dev_add(pdata, feature);
> > +           if (IS_ERR(dfl_dev)) {
> > +                   dfl_devs_uinit(pdata);
> > +                   return PTR_ERR(dfl_dev);
> What happens to dfl_dev's that were successful. Need a clean up ?

Yes, the already added dfl devices under this pdev will be unregistered
in function dfl_devs_uinit()

> > +           }
> > +
> > +           feature->priv = dfl_dev;
> > +   }
> > +
> > +   return 0;
> > +}

Reply via email to