Skip to content

Commit

Permalink
V4L/DVB (6811): media-video-usbvision-add-mutex_unlock-to-error-paths…
Browse files Browse the repository at this point in the history
…-fix

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
  • Loading branch information
Andrew Morton authored and Mauro Carvalho Chehab committed Jan 25, 2008
1 parent 0991112 commit 544e617
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/media/video/usbvision/usbvision-video.c
Original file line number Diff line number Diff line change
Expand Up @@ -1290,8 +1290,8 @@ static int usbvision_radio_open(struct inode *inode, struct file *file)
errCode = usbvision_set_alternate(usbvision);
if (errCode < 0) {
usbvision->last_error = errCode;
mutex_unlock(&usbvision->lock);
return -EBUSY;
errCode = -EBUSY;
goto out;
}

// If so far no errors then we shall start the radio
Expand All @@ -1308,6 +1308,7 @@ static int usbvision_radio_open(struct inode *inode, struct file *file)
usbvision->initialized = 0;
}
}
out:
mutex_unlock(&usbvision->lock);
return errCode;
}
Expand Down

0 comments on commit 544e617

Please sign in to comment.