ia64/xen-unstable

changeset 9250:7d8efd4f1ac7

Initialise blkfront_info to zeroes after allocating it.

Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Tue Mar 14 15:18:35 2006 +0100 (2006-03-14)
parents d14cb80574ee
children ccf3d5cd1428
files linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c	Tue Mar 14 13:01:43 2006 +0100
     1.2 +++ b/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c	Tue Mar 14 15:18:35 2006 +0100
     1.3 @@ -95,21 +95,17 @@ static int blkfront_probe(struct xenbus_
     1.4  		xenbus_dev_fatal(dev, -ENOMEM, "allocating info structure");
     1.5  		return -ENOMEM;
     1.6  	}
     1.7 +
     1.8 +	memset(info, 0, sizeof(*info));
     1.9  	info->xbdev = dev;
    1.10  	info->vdevice = vdevice;
    1.11  	info->connected = BLKIF_STATE_DISCONNECTED;
    1.12 -	info->mi = NULL;
    1.13 -	info->gd = NULL;
    1.14  	INIT_WORK(&info->work, blkif_restart_queue, (void *)info);
    1.15  
    1.16 -	info->shadow_free = 0;
    1.17 -	memset(info->shadow, 0, sizeof(info->shadow));
    1.18  	for (i = 0; i < BLK_RING_SIZE; i++)
    1.19  		info->shadow[i].req.id = i+1;
    1.20  	info->shadow[BLK_RING_SIZE-1].req.id = 0x0fffffff;
    1.21  
    1.22 -	info->users = 0;
    1.23 -
    1.24  	/* Front end dir is a number, which is used as the id. */
    1.25  	info->handle = simple_strtoul(strrchr(dev->nodename,'/')+1, NULL, 0);
    1.26  	dev->data = info;