summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/ivtv/ivtv-ioctl.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2007-06-16 23:24:47 +0200
committerHans Verkuil <hverkuil@xs4all.nl>2007-06-16 23:24:47 +0200
commit571714f552dabd4cba7f7693ec5ce5464b443ea7 (patch)
tree19683353f838e79b6cd51f8abef543b9f2718e8b /linux/drivers/media/video/ivtv/ivtv-ioctl.c
parentb0673bf03251d0ed4f5da34f650286269f95f6e5 (diff)
downloadmediapointer-dvb-s2-571714f552dabd4cba7f7693ec5ce5464b443ea7.tar.gz
mediapointer-dvb-s2-571714f552dabd4cba7f7693ec5ce5464b443ea7.tar.bz2
ivtv: fix return code of VIDIOC_G/S_FBUF when no framebuffer is present.
From: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Diffstat (limited to 'linux/drivers/media/video/ivtv/ivtv-ioctl.c')
-rw-r--r--linux/drivers/media/video/ivtv/ivtv-ioctl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/linux/drivers/media/video/ivtv/ivtv-ioctl.c b/linux/drivers/media/video/ivtv/ivtv-ioctl.c
index 69d1100a9..e0b62f2d1 100644
--- a/linux/drivers/media/video/ivtv/ivtv-ioctl.c
+++ b/linux/drivers/media/video/ivtv/ivtv-ioctl.c
@@ -1171,7 +1171,7 @@ int ivtv_v4l2_ioctls(struct ivtv *itv, struct file *filp, unsigned int cmd, void
memset(fb, 0, sizeof(*fb));
if (!(itv->v4l2_cap & V4L2_CAP_VIDEO_OUTPUT_OVERLAY))
- break;
+ return -EINVAL;
fb->capability = V4L2_FBUF_CAP_EXTERNOVERLAY | V4L2_FBUF_CAP_CHROMAKEY |
V4L2_FBUF_CAP_LOCAL_ALPHA | V4L2_FBUF_CAP_GLOBAL_ALPHA;
fb->fmt.pixelformat = itv->osd_pixelformat;
@@ -1191,7 +1191,7 @@ int ivtv_v4l2_ioctls(struct ivtv *itv, struct file *filp, unsigned int cmd, void
struct v4l2_framebuffer *fb = arg;
if (!(itv->v4l2_cap & V4L2_CAP_VIDEO_OUTPUT_OVERLAY))
- break;
+ return -EINVAL;
itv->osd_global_alpha_state = (fb->flags & V4L2_FBUF_FLAG_GLOBAL_ALPHA) != 0;
itv->osd_local_alpha_state = (fb->flags & V4L2_FBUF_FLAG_LOCAL_ALPHA) != 0;
itv->osd_color_key_state = (fb->flags & V4L2_FBUF_FLAG_CHROMAKEY) != 0;