From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Lunn Subject: Re: [PATCH v3 net-next 7/8] lan743x: Add EEE support Date: Wed, 18 Jul 2018 23:46:24 +0200 Message-ID: <20180718214624.GB23800@lunn.ch> References: <1531947878-9758-1-git-send-email-Bryan.Whitehead@microchip.com> <1531947878-9758-8-git-send-email-Bryan.Whitehead@microchip.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: davem@davemloft.net, netdev@vger.kernel.org, UNGLinuxDriver@microchip.com To: Bryan Whitehead Return-path: Received: from vps0.lunn.ch ([185.16.172.187]:39182 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726834AbeGRW0R (ORCPT ); Wed, 18 Jul 2018 18:26:17 -0400 Content-Disposition: inline In-Reply-To: <1531947878-9758-8-git-send-email-Bryan.Whitehead@microchip.com> Sender: netdev-owner@vger.kernel.org List-ID: > + if (eee->eee_enabled) { > + ret = phy_init_eee(phydev, 0); > + if (ret) { > + netif_err(adapter, drv, adapter->netdev, > + "EEE initialization failed\n"); > + return ret; > + } > + > + buf = lan743x_csr_read(adapter, MAC_CR); > + buf |= MAC_CR_EEE_EN_; > + lan743x_csr_write(adapter, MAC_CR, buf); > + > + phy_ethtool_set_eee(phydev, eee); Hi Bryan It could return an error, so please check the return value. Maybe move this call out of the if to keep the code minimal? Andrew