ia64/xen-unstable

changeset 7292:ab93a9a46bd4

Don't increment mi->usage is alloc_major_info return NULL

Signed-off-by: Vincent Hanquez <vincent@xensource.com>
author vh249@kneesaa.uk.xensource.com
date Sun Oct 09 12:29:24 2005 -0400 (2005-10-09)
parents 8f7ee9ab31ac
children 8016551fde98
files linux-2.6-xen-sparse/drivers/xen/blkfront/vbd.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/drivers/xen/blkfront/vbd.c	Sun Oct 09 16:26:08 2005 +0100
     1.2 +++ b/linux-2.6-xen-sparse/drivers/xen/blkfront/vbd.c	Sun Oct 09 12:29:24 2005 -0400
     1.3 @@ -160,7 +160,8 @@ xlbd_get_major_info(int vdevice)
     1.4  
     1.5  	mi = ((major_info[index] != NULL) ? major_info[index] :
     1.6  	      xlbd_alloc_major_info(major, minor, index));
     1.7 -	mi->usage++;
     1.8 +	if (mi)
     1.9 +		mi->usage++;
    1.10  	return mi;
    1.11  }
    1.12