From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Petazzoni Subject: Re: [PATCH v2] net: sh_eth: do not advertise Gigabit capabilities when not available Date: Fri, 8 Dec 2017 16:36:21 +0100 Message-ID: <20171208163621.0c8f4e7d@windsurf.lan> References: <20171205092952.3455-1-thomas.petazzoni@free-electrons.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: "David S. Miller" , Niklas =?UTF-8?B?U8O2ZGVybHVu?= =?UTF-8?B?ZA==?= , Geert Uytterhoeven , Simon Horman , netdev@vger.kernel.org, linux-renesas-soc@vger.kernel.org To: Sergei Shtylyov Return-path: In-Reply-To: Sender: linux-renesas-soc-owner@vger.kernel.org List-Id: netdev.vger.kernel.org Hello, On Tue, 5 Dec 2017 22:02:20 +0300, Sergei Shtylyov wrote: > > + /* mask with MAC supported features */ > > + if (mdp->cd->register_type != SH_ETH_REG_GIGABIT) { > > + err = phy_set_max_speed(phydev, SPEED_100); > > + if (err) { > > + netdev_err(ndev, "failed to limit PHY to 100 Mbit/s\n"); > > + goto err_phy_disconnect; > > Er, why do we need a *goto* here at all? Just call phy_disconnect() here > and be done with that... Thanks for the feedback, I've sent a v3 that takes into account this comment. Thanks! Thomas -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com