Skip to content
Commit a78c16e1 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by David S. Miller
Browse files

mdio: mux: avoid 'maybe-uninitialized' warning



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: default avatarArnd Bergmann <arnd@arndb.de>
Fixes: f20e6657 ("mdio: mux: Enhanced MDIO mux framework for integrated multiplexers")
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b06f9527
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment