lkml.org 
[lkml]   [2020]   [Feb]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 3/3] phy: intel: Add driver support for Combophy
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


\
 
 \ /
  Last update: 2020-02-26 15:45    [W:0.054 / U:2.580 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site