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  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]
Date:   Tue, 1 Sep 2020 10:04:37 +0200
From:   Marco Felsch <m.felsch@...gutronix.de>
To:     Andrew Lunn <andrew@...n.ch>
Cc:     davem@...emloft.net, kuba@...nel.org, robh+dt@...nel.org,
        f.fainelli@...il.com, hkallweit1@...il.com, linux@...linux.org.uk,
        zhengdejin5@...il.com, richard.leitner@...data.com,
        netdev@...r.kernel.org, devicetree@...r.kernel.org,
        kernel@...gutronix.de
Subject: Re: [PATCH 4/5] net: phy: smsc: add phy refclk in support

On 20-08-31 16:08, Andrew Lunn wrote:
> > +	priv->refclk = devm_clk_get_optional(dev, NULL);
> > +	if (IS_ERR(priv->refclk)) {
> > +		if (PTR_ERR(priv->refclk) == -EPROBE_DEFER)
> > +			return -EPROBE_DEFER;
> > +
> > +		/* Clocks are optional all errors should be ignored here */
> > +		return 0;
> 
> Since you are calling devm_clk_get_optional() isn't an error a real
> error, not that the clock is missing? It probably should be returned
> as an error code.

Yes you're right. Actually I can't remember why went this way... I will
change this to dev_err_probe() and this gets a oneliner.

Regards,
  Marco

> 
>    Andrew
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

Powered by blists - more mailing lists