return -EIO; 
return -EINVAL; 
static int vino_v4l2_dqbuf(struct vino_channel_settings *vcs,			   struct v4l2_buffer *b,			   unsigned int nonblocking){	if (vcs->reading)		return -EBUSY;	switch (b->type) {	case V4L2_BUF_TYPE_VIDEO_CAPTURE: {		struct vino_framebuffer *fb;		unsigned int incoming, outgoing;		int err;		// TODO: check queue type		err = vino_queue_get_incoming(&vcs->fb_queue, &incoming);		if (err) {			dprintk("vino_queue_get_incoming() failed\n");			return -EIO;		}		err = vino_queue_get_outgoing(&vcs->fb_queue, &outgoing);		if (err) {			dprintk("vino_queue_get_outgoing() failed\n");			return -EIO;		}		dprintk("incoming = %d, outgoing = %d\n", incoming, outgoing);		if (outgoing == 0) {			if (incoming == 0) {				dprintk("no incoming or outgoing buffers\n");				return -EINVAL;			}			if (nonblocking) {				dprintk("non-blocking I/O was selected and "					"there are no buffers to dequeue\n");				return -EAGAIN;			}			err = vino_wait_for_frame(vcs);			if (err) {				err = vino_wait_for_frame(vcs);				if (err) {					/* interrupted */					vino_capture_failed(vcs);					return -EIO;				}			}		}		fb = vino_queue_remove(&vcs->fb_queue, &b->index);		if (fb == NULL) {			dprintk("vino_queue_remove() failed\n");			return -EINVAL;		}		err = vino_check_buffer(vcs, fb);		if (err)			return -EIO;		vino_v4l2_get_buffer_status(vcs, fb, b);		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