Re: [PATCH v3 3/3] phy: intel: Add driver support for Combophy

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 26, 2020 at 04:41:47PM +0200, Andy Shevchenko wrote:
> On Wed, Feb 26, 2020 at 06:09:53PM +0800, Dilip Kota wrote:

> > +	i = 0;
> > +	fwnode_for_each_available_child_node(dev_fwnode(dev), fwnode) {
> 
> > +		if (i >= PHY_MAX_NUM) {
> > +			fwnode_handle_put(fwnode);
> > +			dev_err(dev, "Error: DT child number larger than %d\n",
> > +				PHY_MAX_NUM);
> > +			return -EINVAL;
> > +		}
> 
> Logically this part is better to put after i++; line...

Ah, dismiss this, I forgot the fwnode_handle_put() part along with amount of
accessible children.

> > +		ret = intel_cbphy_iphy_dt_parse(cbphy, fwnode, i);
> > +		if (ret) {
> > +			fwnode_handle_put(fwnode);
> > +			return ret;
> > +		}
> > +
> 
> > +		i++;
> 
> ...here.
> 
> > +	}
> > +
> > +	return intel_cbphy_dt_sanity_check(cbphy);
> > +}

-- 
With Best Regards,
Andy Shevchenko





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux