[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87k2n4fcl5.fsf@nemi.mork.no>
Date: Wed, 20 Jan 2016 17:19:18 +0100
From: Bjørn Mork <bjorn@...k.no>
To: Michael Grzeschik <m.grzeschik@...gutronix.de>
Cc: mkl@...gutronix.de, wg@...ndegger.com, linux-can@...r.kernel.org,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
kernel@...gutronix.de
Subject: Re: [PATCH v2] can: c_can: add xceiver enable/disable support
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?
Bjørn
Powered by blists - more mailing lists