From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932386AbcFNUpN (ORCPT ); Tue, 14 Jun 2016 16:45:13 -0400 Received: from vps0.lunn.ch ([178.209.37.122]:45980 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752205AbcFNUpL (ORCPT ); Tue, 14 Jun 2016 16:45:11 -0400 Date: Tue, 14 Jun 2016 22:45:06 +0200 From: Andrew Lunn To: Arnd Bergmann Cc: Florian Fainelli , "David S. Miller" , Pramod Kumar , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mdio: mux: avoid 'maybe-uninitialized' warning Message-ID: <20160614204506.GB12832@lunn.ch> References: <1465898632-2248093-1-git-send-email-arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1465898632-2248093-1-git-send-email-arnd@arndb.de> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 14, 2016 at 12:03:17PM +0200, Arnd Bergmann wrote: > The latest changes to the MDIO code introduced a false-positive > warning with gcc-6 (possibly others): > > drivers/net/phy/mdio-mux.c: In function 'mdio_mux_init': > drivers/net/phy/mdio-mux.c:188:3: error: 'parent_bus_node' may be used uninitialized in this function [-Werror=maybe-uninitialized] > > It's easy to avoid the warning by making sure the parent_bus_node > is initialized in both cases at the start of the function, since > the later 'of_node_put()' call is also valid for a NULL pointer > argument. > > Signed-off-by: Arnd Bergmann > Fixes: f20e6657a875 ("mdio: mux: Enhanced MDIO mux framework for integrated multiplexers") Reviewed-by: Andrew Lunn Thanks Arnd Andrew