aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/um/drivers/net_kern.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/um/drivers/net_kern.c b/arch/um/drivers/net_kern.c
index fb1f9fb9b871..f3442ce29a21 100644
--- a/arch/um/drivers/net_kern.c
+++ b/arch/um/drivers/net_kern.c
@@ -317,6 +317,11 @@ static int eth_configure(int n, void *init, char *mac,
317 return 1; 317 return 1;
318 } 318 }
319 319
320 lp = dev->priv;
321 /* This points to the transport private data. It's still clear, but we
322 * must memset it to 0 *now*. Let's help the drivers. */
323 memset(lp, 0, size);
324
320 /* sysfs register */ 325 /* sysfs register */
321 if (!driver_registered) { 326 if (!driver_registered) {
322 platform_driver_register(&uml_net_driver); 327 platform_driver_register(&uml_net_driver);
@@ -358,7 +363,6 @@ static int eth_configure(int n, void *init, char *mac,
358 free_netdev(dev); 363 free_netdev(dev);
359 return 1; 364 return 1;
360 } 365 }
361 lp = dev->priv;
362 366
363 /* lp.user is the first four bytes of the transport data, which 367 /* lp.user is the first four bytes of the transport data, which
364 * has already been initialized. This structure assignment will 368 * has already been initialized. This structure assignment will