printk("%s: Memory allocation failure\n", __FUNCTION__); 
dprintk("%s: Memory allocation failure\n", __FUNCTION__); 
static int dst_ca_ioctl(struct inode *inode, struct file *file, unsigned int cmd, void *arg){	struct dvb_device* dvbdev = (struct dvb_device*) file->private_data;	struct dst_state* state = (struct dst_state*) dvbdev->priv;	struct ca_slot_info *p_ca_slot_info;	struct ca_caps *p_ca_caps;	struct ca_msg *p_ca_message;	if ((p_ca_message = (struct ca_msg *) kmalloc(sizeof (struct ca_msg), GFP_KERNEL)) == NULL) {		printk("%s: Memory allocation failure\n", __FUNCTION__);		return -ENOMEM;	}	if ((p_ca_slot_info = (struct ca_slot_info *) kmalloc(sizeof (struct ca_slot_info), GFP_KERNEL)) == NULL) {		printk("%s: Memory allocation failure\n", __FUNCTION__);		return -ENOMEM;	}	if ((p_ca_caps = (struct ca_caps *) kmalloc(sizeof (struct ca_caps), GFP_KERNEL)) == NULL) {		printk("%s: Memory allocation failure\n", __FUNCTION__);		return -ENOMEM;	}	/*	We have now only the standard ioctl's, the driver is upposed to handle internals.	*/	switch (cmd) {		case CA_SEND_MSG:			if (verbose > 1)				dprintk("%s: Sending message\n", __FUNCTION__);			if ((ca_send_message(state, p_ca_message, arg)) < 0) {				dprintk("%s: -->CA_SEND_MSG Failed !\n", __FUNCTION__);				return -1;			}			break;		case CA_GET_MSG:			if (verbose > 1)				dprintk("%s: Getting message\n", __FUNCTION__);			if ((ca_get_message(state, p_ca_message, arg)) < 0) {				dprintk("%s: -->CA_GET_MSG Failed !\n", __FUNCTION__);				return -1;			}			if (verbose > 1)				dprintk("%s: -->CA_GET_MSG Success !\n", __FUNCTION__);			break;		case CA_RESET:			if (verbose > 1)				dprintk("%s: Resetting DST\n", __FUNCTION__);			dst_error_bailout(state);			msleep(4000);			break;		case CA_GET_SLOT_INFO:			if (verbose > 1)				dprintk("%s: Getting Slot info\n", __FUNCTION__);			if ((ca_get_slot_info(state, p_ca_slot_info, arg)) < 0) {				dprintk("%s: -->CA_GET_SLOT_INFO Failed !\n", __FUNCTION__);				return -1;			}			if (verbose > 1)				dprintk("%s: -->CA_GET_SLOT_INFO Success !\n", __FUNCTION__);			break;		case CA_GET_CAP:			if (verbose > 1)				dprintk("%s: Getting Slot capabilities\n", __FUNCTION__);			if ((ca_get_slot_caps(state, p_ca_caps, arg)) < 0) {				dprintk("%s: -->CA_GET_CAP Failed !\n", __FUNCTION__);				return -1;			}			if (verbose > 1)				dprintk("%s: -->CA_GET_CAP Success !\n", __FUNCTION__);			break;		case CA_GET_DESCR_INFO:			if (verbose > 1)				dprintk("%s: Getting descrambler description\n", __FUNCTION__);			if ((ca_get_slot_descr(state, p_ca_message, arg)) < 0) {				dprintk("%s: -->CA_GET_DESCR_INFO Failed !\n", __FUNCTION__);				return -1;			}			if (verbose > 1)				dprintk("%s: -->CA_GET_DESCR_INFO Success !\n", __FUNCTION__);			break;		case CA_SET_DESCR:			if (verbose > 1)				dprintk("%s: Setting descrambler\n", __FUNCTION__);			if ((ca_set_slot_descr()) < 0) {				dprintk("%s: -->CA_SET_DESCR Failed !\n", __FUNCTION__);				return -1;			}			if (verbose > 1)				dprintk("%s: -->CA_SET_DESCR Success !\n", __FUNCTION__);			break;		case CA_SET_PID:			if (verbose > 1)				dprintk("%s: Setting PID\n", __FUNCTION__);			if ((ca_set_pid()) < 0) {				dprintk("%s: -->CA_SET_PID Failed !\n", __FUNCTION__);				return -1;			}			if (verbose > 1)				dprintk("%s: -->CA_SET_PID Success !\n", __FUNCTION__);		default:			return -EOPNOTSUPP;		};	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/7d53421c6adce47d067b834c605daeafe1ff9356/dst_ca.c/clean/drivers/media/dvb/bt8xx/dst_ca.c