]> git.dujemihanovic.xyz Git - u-boot.git/commit
net: smc911x: Fix potential memleak() in init fail path
authorMarek Vasut <marek.vasut+renesas@gmail.com>
Sun, 15 Mar 2020 14:57:14 +0000 (15:57 +0100)
committermarex <marex@desktop.lan>
Fri, 1 May 2020 10:35:21 +0000 (12:35 +0200)
commit9741795408d2fb907256899cd9403dd57b917358
tree28cef670332ed29a8ec5e893c26f727cbcd8f44b
parent6f6cf0083f466c49c97c175b0169a0cd31c35d63
net: smc911x: Fix potential memleak() in init fail path

Fix memleak in the init fail path, where if allocation or registration
of MDIO bus fails, then ethernet interface is not unregistered and the
private data are not freed, yet the probe function reports a failure.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
drivers/net/smc911x.c