Re: [PATCH] net: smc91x: Fix possible memory leak in smc_drv_probe()

2020-07-17 Thread David Miller
From: Wang Hai Date: Thu, 16 Jul 2020 11:50:38 +0800 > If try_toggle_control_gpio() failed in smc_drv_probe(), free_netdev(ndev) > should be called to free the ndev created earlier. Otherwise, a memleak > will occur. > > Fixes: 7d2911c43815 ("net: smc91x: Fix gpios for device tree based booting"

Re: [PATCH] net: smc91x: Fix possible memory leak in smc_drv_probe()

2020-07-15 Thread Markus Elfring
> If try_toggle_control_gpio() failed in smc_drv_probe(), free_netdev(ndev) > should be called to free the ndev created earlier. Otherwise, a memleak > will occur. * Will it be nicer to use the term “memory leak” also in this change description? * Would another imperative wording be preferred fo

[PATCH] net: smc91x: Fix possible memory leak in smc_drv_probe()

2020-07-15 Thread Wang Hai
If try_toggle_control_gpio() failed in smc_drv_probe(), free_netdev(ndev) should be called to free the ndev created earlier. Otherwise, a memleak will occur. Fixes: 7d2911c43815 ("net: smc91x: Fix gpios for device tree based booting") Reported-by: Hulk Robot Signed-off-by: Wang Hai --- drivers/