if (!vino_is_input_owner(vcs)) { spin_unlock(&vino_drvdata->input_lock); return -EINVAL; } 
spin_lock_irqsave(&vino_drvdata->input_lock, flags); 
static int vino_v4l2_s_fmt(struct vino_channel_settings *vcs,			   struct v4l2_format *f){	int data_format;	switch (f->type) {	case V4L2_BUF_TYPE_VIDEO_CAPTURE: {		struct v4l2_pix_format *pf = &f->fmt.pix;		spin_lock(&vino_drvdata->input_lock);		if (!vino_is_input_owner(vcs)) {			spin_unlock(&vino_drvdata->input_lock);			return -EINVAL;		}		data_format = vino_find_data_format(pf->pixelformat);		if (data_format == VINO_DATA_FMT_NONE) {			vcs->data_format = VINO_DATA_FMT_RGB32;			pf->pixelformat =				vino_data_formats[vcs->data_format].				pixelformat;		} else {			vcs->data_format = data_format;		}		/* data format must be set before clipping/scaling */		vino_set_scaling(vcs, pf->width, pf->height);		dprintk("data format = %s\n",		       vino_data_formats[vcs->data_format].description);		pf->width = vcs->clipping.right - vcs->clipping.left;		pf->height = vcs->clipping.bottom - vcs->clipping.top;		pf->field = V4L2_FIELD_INTERLACED;		pf->bytesperline = vcs->line_size;		pf->sizeimage = vcs->line_size *			(vcs->clipping.bottom - vcs->clipping.top) /			vcs->decimation;		pf->colorspace =			vino_data_formats[vcs->data_format].colorspace;		pf->priv = 0;		spin_unlock(&vino_drvdata->input_lock);		break;	}	case V4L2_BUF_TYPE_VIDEO_OVERLAY:	default:		return -EINVAL;	}	return 0;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/a637a114f36b94a1ad8b9867f43bac0414958420/vino.c/buggy/drivers/media/video/vino.c