]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: mdio-mux: Check return value of mdiobus_alloc()
authorTobias Klauser <tklauser@distanz.ch>
Mon, 14 Dec 2015 12:51:51 +0000 (13:51 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 14 Dec 2015 19:27:40 +0000 (14:27 -0500)
commit1198ccea577d37a3c05bdec931ff944926d64e2e
tree3e35b883fd2b52e4c93ca8b6e12e1bb88f4a646a
parent02fc0f34b8405a67213099ce053ca43da04d878d
net: phy: mdio-mux: Check return value of mdiobus_alloc()

mdiobus_alloc() might return NULL, but its return value is not
checked in mdio_mux_init(). This could potentially lead to a NULL
pointer dereference. Fix it by checking the return value

Fixes: 13dc39ce5b35 ("netdev/of/phy: Add MDIO bus multiplexer support.")
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/mdio-mux.c