list_for_each_entry(cmp, &(user->intf->cmd_rcvrs), link) { if ((cmp->netfn == netfn) && (cmp->cmd == cmd)) { rv = -EBUSY; break; } 
entry = find_cmd_rcvr(intf, netfn, cmd); if (entry) { rv = -EBUSY; goto out_unlock; 
int ipmi_register_for_cmd(ipmi_user_t   user,			  unsigned char netfn,			  unsigned char cmd){	struct cmd_rcvr  *cmp;	unsigned long    flags;	struct cmd_rcvr  *rcvr;	int              rv = 0;	rcvr = kmalloc(sizeof(*rcvr), GFP_KERNEL);	if (! rcvr)		return -ENOMEM;	read_lock(&(user->intf->users_lock));	write_lock_irqsave(&(user->intf->cmd_rcvr_lock), flags);	/* Make sure the command/netfn is not already registered. */	list_for_each_entry(cmp, &(user->intf->cmd_rcvrs), link) {		if ((cmp->netfn == netfn) && (cmp->cmd == cmd)) {			rv = -EBUSY;			break;		}	}	if (! rv) {		rcvr->cmd = cmd;		rcvr->netfn = netfn;		rcvr->user = user;		list_add_tail(&(rcvr->link), &(user->intf->cmd_rcvrs));	}	write_unlock_irqrestore(&(user->intf->cmd_rcvr_lock), flags);	read_unlock(&(user->intf->users_lock));	if (rv)		kfree(rcvr);	return rv;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/393d2cc354d150b8b4bb888a9da7db4c935e12bd/ipmi_msghandler.c/clean/drivers/char/ipmi/ipmi_msghandler.c