From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933361AbcFPDtW (ORCPT ); Wed, 15 Jun 2016 23:49:22 -0400 Received: from shards.monkeyblade.net ([149.20.54.216]:36235 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933230AbcFPDtU (ORCPT ); Wed, 15 Jun 2016 23:49:20 -0400 Date: Wed, 15 Jun 2016 20:49:19 -0700 (PDT) Message-Id: <20160615.204919.728147597242559549.davem@davemloft.net> To: arnd@arndb.de Cc: f.fainelli@gmail.com, andrew@lunn.ch, pramod.kumar@broadcom.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mdio: mux: avoid 'maybe-uninitialized' warning From: David Miller In-Reply-To: <1465898632-2248093-1-git-send-email-arnd@arndb.de> References: <1465898632-2248093-1-git-send-email-arnd@arndb.de> X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Wed, 15 Jun 2016 20:49:20 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann Date: Tue, 14 Jun 2016 12:03:17 +0200 > 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") Applied.