if (kbd->func_table[kb_func]) kfree(kbd->func_table[kb_func]); 
kfree(kbd->func_table[kb_func]); 
do_kdgkb_ioctl(struct kbd_data *kbd, struct kbsentry __user *u_kbs,	       int cmd, int perm){	unsigned char kb_func;	char *p;	int len;	/* Get u_kbs->kb_func. */	if (get_user(kb_func, &u_kbs->kb_func))		return -EFAULT;#if MAX_NR_FUNC < 256	if (kb_func >= MAX_NR_FUNC)		return -EINVAL;#endif	switch (cmd) {	case KDGKBSENT:		p = kbd->func_table[kb_func];		if (p) {			len = strlen(p);			if (len >= sizeof(u_kbs->kb_string))				len = sizeof(u_kbs->kb_string) - 1;			if (copy_to_user(u_kbs->kb_string, p, len))				return -EFAULT;		} else			len = 0;		if (put_user('\0', u_kbs->kb_string + len))			return -EFAULT;		break;	case KDSKBSENT:		if (!perm)			return -EPERM;		len = strnlen_user(u_kbs->kb_string,				   sizeof(u_kbs->kb_string) - 1);		p = kmalloc(len, GFP_KERNEL);		if (!p)			return -ENOMEM;		if (copy_from_user(p, u_kbs->kb_string, len)) {			kfree(p);			return -EFAULT;		}		p[len] = 0;		if (kbd->func_table[kb_func])			kfree(kbd->func_table[kb_func]);		kbd->func_table[kb_func] = p;		break;	}	return 0;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/17fd682e544556a2a829e94383239c029bb21c5e/keyboard.c/clean/drivers/s390/char/keyboard.c