class_dev = kmalloc(sizeof(struct class_device), GFP_KERNEL); 
class_dev = kzalloc(sizeof(*class_dev), GFP_KERNEL); 
struct class_device *class_device_create(struct class *cls, dev_t devt,					 struct device *device, char *fmt, ...){	va_list args;	struct class_device *class_dev = NULL;	int retval = -ENODEV;	if (cls == NULL || IS_ERR(cls))		goto error;	class_dev = kmalloc(sizeof(struct class_device), GFP_KERNEL);	if (!class_dev) {		retval = -ENOMEM;		goto error;	}	memset(class_dev, 0x00, sizeof(struct class_device));	class_dev->devt = devt;	class_dev->dev = device;	class_dev->class = cls;	va_start(args, fmt);	vsnprintf(class_dev->class_id, BUS_ID_SIZE, fmt, args);	va_end(args);	retval = class_device_register(class_dev);	if (retval)		goto error;	return class_dev;error:	kfree(class_dev);	return ERR_PTR(retval);}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/4aed0644d684428e811bb6944f032b460a3ab165/class.c/clean/drivers/base/class.c