Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 295017
b: refs/heads/master
c: 6c61ac6
h: refs/heads/master
i:
  295015: 1e2067b
v: v3
  • Loading branch information
Dan Carpenter authored and Mauro Carvalho Chehab committed Mar 8, 2012
1 parent 986276b commit a88038a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: da0af4788c4e992bf8085b8f585b0fa9c69970fa
refs/heads/master: 6c61ac635535bbabf4f374df171372d012b0e822
10 changes: 4 additions & 6 deletions trunk/drivers/media/video/s2255drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -852,15 +852,13 @@ static int vidioc_querycap(struct file *file, void *priv,
static int vidioc_enum_fmt_vid_cap(struct file *file, void *priv,
struct v4l2_fmtdesc *f)
{
int index = 0;
if (f)
index = f->index;
int index = f->index;

if (index >= ARRAY_SIZE(formats))
return -EINVAL;
if (!jpeg_enable && ((formats[index].fourcc == V4L2_PIX_FMT_JPEG) ||
(formats[index].fourcc == V4L2_PIX_FMT_MJPEG)))
return -EINVAL;
if (!jpeg_enable && ((formats[index].fourcc == V4L2_PIX_FMT_JPEG) ||
(formats[index].fourcc == V4L2_PIX_FMT_MJPEG)))
return -EINVAL;
dprintk(4, "name %s\n", formats[index].name);
strlcpy(f->description, formats[index].name, sizeof(f->description));
f->pixelformat = formats[index].fourcc;
Expand Down

0 comments on commit a88038a

Please sign in to comment.