aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/xen-netback/xenbus.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/xen-netback/xenbus.c')
-rw-r--r--drivers/net/xen-netback/xenbus.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/net/xen-netback/xenbus.c b/drivers/net/xen-netback/xenbus.c
index fab0d4b42f58..d44cd19169bd 100644
--- a/drivers/net/xen-netback/xenbus.c
+++ b/drivers/net/xen-netback/xenbus.c
@@ -404,6 +404,7 @@ static int backend_create_xenvif(struct backend_info *be)
404 int err; 404 int err;
405 long handle; 405 long handle;
406 struct xenbus_device *dev = be->dev; 406 struct xenbus_device *dev = be->dev;
407 struct xenvif *vif;
407 408
408 if (be->vif != NULL) 409 if (be->vif != NULL)
409 return 0; 410 return 0;
@@ -414,13 +415,13 @@ static int backend_create_xenvif(struct backend_info *be)
414 return (err < 0) ? err : -EINVAL; 415 return (err < 0) ? err : -EINVAL;
415 } 416 }
416 417
417 be->vif = xenvif_alloc(&dev->dev, dev->otherend_id, handle); 418 vif = xenvif_alloc(&dev->dev, dev->otherend_id, handle);
418 if (IS_ERR(be->vif)) { 419 if (IS_ERR(vif)) {
419 err = PTR_ERR(be->vif); 420 err = PTR_ERR(vif);
420 be->vif = NULL;
421 xenbus_dev_fatal(dev, err, "creating interface"); 421 xenbus_dev_fatal(dev, err, "creating interface");
422 return err; 422 return err;
423 } 423 }
424 be->vif = vif;
424 425
425 kobject_uevent(&dev->dev.kobj, KOBJ_ONLINE); 426 kobject_uevent(&dev->dev.kobj, KOBJ_ONLINE);
426 return 0; 427 return 0;