Commit d11a274
net: smc91x: Fix possible memory leak in smc_drv_probe()
[ Upstream commit bca9749 ]
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: 7d2911c ("net: smc91x: Fix gpios for device tree based booting")
Reported-by: Hulk Robot <[email protected]>
Signed-off-by: Wang Hai <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>1 parent a2cdb4e commit d11a274
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2274 | 2274 | | |
2275 | 2275 | | |
2276 | 2276 | | |
2277 | | - | |
| 2277 | + | |
2278 | 2278 | | |
2279 | 2279 | | |
2280 | 2280 | | |
| |||
2283 | 2283 | | |
2284 | 2284 | | |
2285 | 2285 | | |
2286 | | - | |
| 2286 | + | |
2287 | 2287 | | |
2288 | 2288 | | |
2289 | 2289 | | |
| |||
0 commit comments