From: iceberg <strakh@ispras.ru>
To: linux-kernel@vger.kernel.org
Subject: PROBLEM: bug at ./drivers/media/video/hdpvr/hdpvr-core.c
Date: Fri, 3 Jul 2009 14:53:27 +0400 [thread overview]
Message-ID: <200907031453.27467.strakh@ispras.ru> (raw)
KERNEL_V ERSION: 2.6.30
SUBJECT: in function device_authorization mutex is not released on error
path.
DESCRIBE:
In ./drivers/media/video/hdpvr/hdpvr-core.c in function device_authorization:
If after mutex lock (line 4) usb_control_msg returns ret!=46 we go to label
error. In this case before exit from function mutex must be unlocked.
01) static int device_authorization(struct hdpvr_device *dev)
02) {
03) ............
04) mutex_lock(&dev->usbc_mutex);
05) ret = usb_control_msg(dev->udev,
06) usb_rcvctrlpipe(dev->udev, 0),
07) rcv_request, 0x80 | request_type,
08) 0x0400, 0x0003,
09) dev->usbc_buf, 46,10000);
10) if (ret != 46) {
11) v4l2_err(&dev->v4l2_dev,
12) "unexpected answer of status request, len %d\n",
ret);
13) goto error;
14) }
15) .................
16) error:
17)
18) return retval;
19) }
reply other threads:[~2009-07-03 11:16 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200907031453.27467.strakh@ispras.ru \
--to=strakh@ispras.ru \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®