mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
eth16i: fix memory leak
Free allocated netdev if no probe is expected. Signed-off-by: Kulikov Vasiliy <segooon@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
0eff683f73
commit
04d5821fa5
1 changed files with 3 additions and 1 deletions
|
@ -1442,8 +1442,10 @@ int __init init_module(void)
|
|||
dev->if_port = eth16i_parse_mediatype(mediatype[this_dev]);
|
||||
|
||||
if(io[this_dev] == 0) {
|
||||
if(this_dev != 0) /* Only autoprobe 1st one */
|
||||
if (this_dev != 0) { /* Only autoprobe 1st one */
|
||||
free_netdev(dev);
|
||||
break;
|
||||
}
|
||||
|
||||
printk(KERN_NOTICE "eth16i.c: Presently autoprobing (not recommended) for a single card.\n");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue