From: Pete Zaitcev <zaitcev@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: Pete Zaitcev <zaitcev@redhat.com>
Subject: Please review patchlet for ov511 (2.4.2-ac19)
Date: Thu, 22 Mar 2001 23:21:14 -0500 [thread overview]
Message-ID: <20010322232114.B14771@devserv.devel.redhat.com> (raw)
Here is the deal:
we have a guy here with a webcam and the following scenario:
1. ov511 disconnects, everything dies/releases/closes fine,
2. webcam soft starts polling open/sleep/open/sleep/...
3. ov511_probe works and reaches ov511_configure,
calls video_register_device().
4. Webcam software opens and oopses on the semafore
that was not initialized yet.
I think video_register_device needs to be done last, when
everything else is ready to accept appliction requests.
Someone please review. The error handling style
of ov511 spins my head. I may be missing a code path somewhere.
Thanks in advance,
-- Pete
--- linux-2.4.2-ac19/drivers/usb/ov511.c Thu Jan 4 13:15:32 2001
+++ linux-2.4.2-ac19-p3/drivers/usb/ov511.c Thu Mar 22 19:55:59 2001
@@ -3141,11 +3141,6 @@
init_waitqueue_head(&ov511->wq);
- if (video_register_device(&ov511->vdev, VFL_TYPE_GRABBER) < 0) {
- err("video_register_device failed");
- return -EBUSY;
- }
-
if (ov511_write_regvals(dev, aRegvalsInit)) goto error;
if (ov511_write_regvals(dev, aRegvalsNorm511)) goto error;
@@ -3214,7 +3209,6 @@
return 0;
error:
- video_unregister_device(&ov511->vdev);
usb_driver_release_interface(&ov511_driver,
&dev->actconfig->interface[ov511->iface]);
@@ -3323,6 +3317,11 @@
ov511->buf_state = BUF_NOT_ALLOCATED;
} else {
err("Failed to configure camera");
+ goto error;
+ }
+
+ if (video_register_device(&ov511->vdev, VFL_TYPE_GRABBER) < 0) {
+ err("video_register_device failed");
goto error;
}
reply other threads:[~2001-03-23 4:22 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=20010322232114.B14771@devserv.devel.redhat.com \
--to=zaitcev@redhat.com \
--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