Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1313361

Re: [PATCH v2] can: c_can: add xceiver enable/disable support

From Michael Grzeschik <mgr@pengutronix.de>
Newsgroups linux.kernel
Subject Re: [PATCH v2] can: c_can: add xceiver enable/disable support
Date 2016-01-20 17:50 +0100
Message-ID <qT47h-Ma-29@gated-at.bofh.it> (permalink)
References <qT1j4-7c8-21@gated-at.bofh.it> <qT3Ee-yP-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi,

On Wed, Jan 20, 2016 at 05:19:18PM +0100, Bjørn Mork wrote:
> Michael Grzeschik <m.grzeschik@pengutronix.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 |

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH v2] can: c_can: add xceiver enable/disable support Michael Grzeschik <m.grzeschik@pengutronix.de> - 2016-01-20 14:50 +0100
  Re: [PATCH v2] can: c_can: add xceiver enable/disable support Markus Pargmann <mpa@pengutronix.de> - 2016-01-20 15:10 +0100
  Re: [PATCH v2] can: c_can: add xceiver enable/disable support Marc Kleine-Budde <mkl@pengutronix.de> - 2016-01-20 15:30 +0100
  Re: [PATCH v2] can: c_can: add xceiver enable/disable support Kurt Van Dijck <dev.kurt@vandijck-laurijssen.be> - 2016-01-20 15:40 +0100
    Re: [PATCH v2] can: c_can: add xceiver enable/disable support Markus Pargmann <mpa@pengutronix.de> - 2016-01-20 15:40 +0100
  Re: [PATCH v2] can: c_can: add xceiver enable/disable support Bjørn Mork <bjorn@mork.no> - 2016-01-20 17:20 +0100
    Re: [PATCH v2] can: c_can: add xceiver enable/disable support Michael Grzeschik <mgr@pengutronix.de> - 2016-01-20 17:50 +0100

csiph-web