Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 192974
b: refs/heads/master
c: a5ef91c
h: refs/heads/master
v: v3
  • Loading branch information
Dean Anderson authored and Mauro Carvalho Chehab committed May 19, 2010
1 parent 1053f2d commit 7793fe8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 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: c0a2ec956d6e61081b6f98b839b0e28979941687
refs/heads/master: a5ef91c9a55c89e8c57e628d371107cdfe2d0bd9
11 changes: 1 addition & 10 deletions trunk/drivers/media/video/s2255drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1753,7 +1753,6 @@ static int s2255_open(struct file *file)
int state;
dprintk(1, "s2255: open called (dev=%s)\n",
video_device_node_name(vdev));
lock_kernel();
for (i = 0; i < MAX_CHANNELS; i++)
if (&dev->vdev[i] == vdev) {
cur_channel = i;
Expand All @@ -1769,7 +1768,6 @@ static int s2255_open(struct file *file)
switch (state) {
case S2255_FW_DISCONNECTING:
mutex_unlock(&dev->open_lock);
unlock_kernel();
return -ENODEV;
case S2255_FW_FAILED:
s2255_dev_err(&dev->udev->dev,
Expand Down Expand Up @@ -1809,30 +1807,24 @@ static int s2255_open(struct file *file)
break;
case S2255_FW_FAILED:
printk(KERN_INFO "2255 firmware load failed.\n");
unlock_kernel();
return -ENODEV;
case S2255_FW_DISCONNECTING:
printk(KERN_INFO "%s: disconnecting\n", __func__);
unlock_kernel();
return -ENODEV;
case S2255_FW_LOADED_DSPWAIT:
case S2255_FW_NOTLOADED:
printk(KERN_INFO "%s: firmware not loaded yet"
"please try again later\n",
__func__);
unlock_kernel();
return -EAGAIN;
default:
printk(KERN_INFO "%s: unknown state\n", __func__);
unlock_kernel();
return -EFAULT;
}
/* allocate + initialize per filehandle data */
fh = kzalloc(sizeof(*fh), GFP_KERNEL);
if (NULL == fh) {
unlock_kernel();
if (NULL == fh)
return -ENOMEM;
}
file->private_data = fh;
fh->dev = dev;
fh->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
Expand Down Expand Up @@ -1860,7 +1852,6 @@ static int s2255_open(struct file *file)
fh->type,
V4L2_FIELD_INTERLACED,
sizeof(struct s2255_buffer), fh);
unlock_kernel();
return 0;
}

Expand Down

0 comments on commit 7793fe8

Please sign in to comment.