[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200721143918.GA20733@yilunxu-OptiPlex-7050>
Date: Tue, 21 Jul 2020 22:39:18 +0800
From: Xu Yilun <yilun.xu@...el.com>
To: Tom Rix <trix@...hat.com>
Cc: mdf@...nel.org, linux-fpga@...r.kernel.org,
linux-kernel@...r.kernel.org, lgoncalv@...hat.com,
Wu Hao <hao.wu@...el.com>,
Matthew Gerlach <matthew.gerlach@...ux.intel.com>,
Russ Weight <russell.h.weight@...el.com>
Subject: Re: [PATCH 2/2] fpga: dfl: create a dfl bus type to support DFL
devices
> > +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;
> > +}
Powered by blists - more mailing lists