chan = kmalloc(sizeof(*chan), GFP_KERNEL); 
chan = kmalloc(sizeof(*chan), GFP_ATOMIC); 
static struct chan *parse_chan(char *str, int pri, int device, 			       struct chan_opts *opts){	struct chan_type *entry;	struct chan_ops *ops;	struct chan *chan;	void *data;	int i;	ops = NULL;	data = NULL;	for(i = 0; i < sizeof(chan_table)/sizeof(chan_table[0]); i++){		entry = &chan_table[i];		if(!strncmp(str, entry->key, strlen(entry->key))){			ops = entry->ops;			str += strlen(entry->key);			break;		}	}	if(ops == NULL){		printk(KERN_ERR "parse_chan couldn't parse \"%s\"\n", 		       str);		return(NULL);	}	if(ops->init == NULL) return(NULL); 	data = (*ops->init)(str, device, opts);	if(data == NULL) return(NULL);	chan = kmalloc(sizeof(*chan), GFP_KERNEL);	if(chan == NULL) return(NULL);	*chan = ((struct chan) { .list	 	= LIST_HEAD_INIT(chan->list),				 .primary	= 1,				 .input		= 0,				 .output 	= 0,				 .opened  	= 0,				 .fd 		= -1,				 .pri 		= pri,				 .ops 		= ops,				 .data 		= data });	return(chan);}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/79ae2cb856ed6a8c48f455d52d5ed5960c671e67/chan_kern.c/buggy/arch/um/drivers/chan_kern.c