Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1423665

Re: [PATCH] mdio: mux: avoid 'maybe-uninitialized' warning

From David Miller <davem@davemloft.net>
Newsgroups linux.kernel
Subject Re: [PATCH] mdio: mux: avoid 'maybe-uninitialized' warning
Date 2016-06-16 05:50 +0200
Message-ID <rKwtz-36W-1@gated-at.bofh.it> (permalink)
References <rJTse-3r2-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Arnd Bergmann <arnd@arndb.de>
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 <arnd@arndb.de>
> Fixes: f20e6657a875 ("mdio: mux: Enhanced MDIO mux framework for integrated multiplexers")

Applied.

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] mdio: mux: avoid 'maybe-uninitialized' warning Arnd Bergmann <arnd@arndb.de> - 2016-06-14 12:10 +0200
  Re: [PATCH] mdio: mux: avoid 'maybe-uninitialized' warning Andrew Lunn <andrew@lunn.ch> - 2016-06-14 22:50 +0200
  Re: [PATCH] mdio: mux: avoid 'maybe-uninitialized' warning David Miller <davem@davemloft.net> - 2016-06-16 05:50 +0200

csiph-web