From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Lunn Subject: Re: [PATCHv2 net-next] net: fec: Ensure clocks are enabled while using mdio bus Date: Sat, 20 Jun 2015 19:58:17 +0200 Message-ID: <20150620175817.GA9863@lunn.ch> References: <1434816914-9816-1-git-send-email-andrew@lunn.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: David Miller , Nimrod Andy , Duan Andy , Cory Tusar , netdev To: Fabio Estevam Return-path: Received: from vps0.lunn.ch ([178.209.37.122]:60021 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754655AbbFTSEL (ORCPT ); Sat, 20 Jun 2015 14:04:11 -0400 Content-Disposition: inline In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: On Sat, Jun 20, 2015 at 02:47:20PM -0300, Fabio Estevam wrote: > On Sat, Jun 20, 2015 at 1:15 PM, Andrew Lunn wrote: > > > @@ -1764,6 +1765,11 @@ static int fec_enet_mdio_read(struct mii_bus *bus, int mii_id, int regnum) > > { > > struct fec_enet_private *fep = bus->priv; > > unsigned long time_left; > > + int ret; > > + > > + ret = clk_prepare_enable(fep->clk_ipg); > > + if (ret) > > + return 0xffff; > > Why don`t you return ret instead? ret would also work. v3 to follow soon. Andrew