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] [day] [month] [year] [list]
Date:	Wed, 20 Jan 2016 17:46:40 +0100
From:	Michael Grzeschik <mgr@...gutronix.de>
To:	Bjørn Mork <bjorn@...k.no>
Cc:	netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-can@...r.kernel.org, mkl@...gutronix.de,
	kernel@...gutronix.de, wg@...ndegger.com
Subject: Re: [PATCH v2] can: c_can: add xceiver enable/disable support

Hi,

On Wed, Jan 20, 2016 at 05:19:18PM +0100, Bjørn Mork wrote:
> Michael Grzeschik <m.grzeschik@...gutronix.de> writes:
> 
> > @@ -1263,6 +1271,10 @@ int register_c_can_dev(struct net_device *dev)
> >  	 */
> >  	pinctrl_pm_select_sleep_state(dev->dev.parent);
> >  
> > +	priv->reg_xceiver = devm_regulator_get(priv->device, "xceiver");
> > +	if (IS_ERR(priv->reg_xceiver))
> > +		return PTR_ERR(priv->reg_xceiver);
> > +
> >  	c_can_pm_runtime_enable(priv);
> >  
> >  	dev->flags |= IFF_ECHO;	/* we support local echo */
> 
> Do you really want to leave priv->reg_xceiver pointing to an ERR_PTR in
> case of error?

No, therefore the priv->reg_xceiver will be returned in case of error.
This codepath is called once on device registration.

Michael

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ