lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200226144530.GR10400@smile.fi.intel.com>
Date:   Wed, 26 Feb 2020 16:45:30 +0200
From:   Andy Shevchenko <andriy.shevchenko@...el.com>
To:     Dilip Kota <eswara.kota@...ux.intel.com>
Cc:     linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
        kishon@...com, robh@...nel.org, cheol.yong.kim@...el.com,
        chuanhua.lei@...ux.intel.com, qi-ming.wu@...el.com,
        yixin.zhu@...el.com
Subject: Re: [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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ