Re: [PATCH 05/12] net: smc911x: Fix potential memleak() in init fail path

2020-03-21 Thread Marek Vasut
On 3/17/20 7:21 AM, Masahiro Yamada wrote: [...] >> @@ -283,15 +283,23 @@ int smc911x_initialize(u8 dev_num, int base_addr) >> #if defined(CONFIG_MII) || defined(CONFIG_CMD_MII) >> int retval; >> struct mii_dev *mdiodev = mdio_alloc(); >> - if (!mdiodev) >> + if (!mdiod

Re: [PATCH 05/12] net: smc911x: Fix potential memleak() in init fail path

2020-03-16 Thread Masahiro Yamada
On Mon, Mar 16, 2020 at 1:59 AM Marek Vasut wrote: > > 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 Va

Re: [PATCH 05/12] net: smc911x: Fix potential memleak() in init fail path

2020-03-16 Thread Joe Hershberger
On Sun, Mar 15, 2020 at 11:59 AM Marek Vasut wrote: > > 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 V

[PATCH 05/12] net: smc911x: Fix potential memleak() in init fail path

2020-03-15 Thread Marek Vasut
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 Cc: Joe Hershberger Cc: Masahiro Yamada --- drivers/net