direct-io.hg

changeset 7414:7169e31606bd

alloc_netif() must return a ERR_PTR() on error, not NULL.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Tue Oct 18 15:40:29 2005 +0100 (2005-10-18)
parents 551d099dae3a
children 3d27ee7da0c1
files linux-2.6-xen-sparse/drivers/xen/netback/interface.c linux-2.6-xen-sparse/drivers/xen/netback/xenbus.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/drivers/xen/netback/interface.c	Tue Oct 18 11:09:36 2005 +0100
     1.2 +++ b/linux-2.6-xen-sparse/drivers/xen/netback/interface.c	Tue Oct 18 15:40:29 2005 +0100
     1.3 @@ -58,7 +58,7 @@ netif_t *alloc_netif(domid_t domid, unsi
     1.4  	dev = alloc_netdev(sizeof(netif_t), name, ether_setup);
     1.5  	if (dev == NULL) {
     1.6  		DPRINTK("Could not create netif: out of memory\n");
     1.7 -		return NULL;
     1.8 +		return ERR_PTR(-ENOMEM);
     1.9  	}
    1.10  
    1.11  	netif = netdev_priv(dev);
    1.12 @@ -104,7 +104,7 @@ netif_t *alloc_netif(domid_t domid, unsi
    1.13  		DPRINTK("Could not register new net device %s: err=%d\n",
    1.14  			dev->name, err);
    1.15  		free_netdev(dev);
    1.16 -		return NULL;
    1.17 +		return ERR_PTR(err);
    1.18  	}
    1.19  
    1.20  	DPRINTK("Successfully created netif\n");
     2.1 --- a/linux-2.6-xen-sparse/drivers/xen/netback/xenbus.c	Tue Oct 18 11:09:36 2005 +0100
     2.2 +++ b/linux-2.6-xen-sparse/drivers/xen/netback/xenbus.c	Tue Oct 18 15:40:29 2005 +0100
     2.3 @@ -28,10 +28,6 @@ struct backend_info
     2.4  	netif_t *netif;
     2.5  
     2.6  	long int frontend_id;
     2.7 -#if 0
     2.8 -	long int pdev;
     2.9 -	long int readonly;
    2.10 -#endif
    2.11  
    2.12  	/* watch back end for changes */
    2.13  	struct xenbus_watch backend_watch;
    2.14 @@ -155,14 +151,6 @@ static void backend_changed(struct xenbu
    2.15  			return;
    2.16  		}
    2.17  
    2.18 -#if 0
    2.19 -		err = vbd_create(be->netif, handle, be->pdev, be->readonly);
    2.20 -		if (err) {
    2.21 -			xenbus_dev_error(dev, err, "creating vbd structure");
    2.22 -			return;
    2.23 -		}
    2.24 -#endif
    2.25 -
    2.26  		kobject_hotplug(&dev->dev.kobj, KOBJ_ONLINE);
    2.27  
    2.28  		/* Pass in NULL node to skip exist test. */