From: e9hack <e9hack@googlemail.com>
To: dougsland@redhat.com
Cc: hverkuil@xs4all.nl, Mauro Carvalho Chehab <mchehab@redhat.com>,
linux-media@vger.kernel.org
Subject: changeset 14351:2eda2bcc8d6f
Date: Wed, 03 Mar 2010 12:39:27 +0100 [thread overview]
Message-ID: <4B8E4A6F.2050809@googlemail.com> (raw)
Hi,
changeset 14351:2eda2bcc8d6f is incomplete. If the init function is split in two function,
the deinit function shall consider this. The changes shall be apply also to av7110_init_v4l().
diff -r 58ae12f18e80 linux/drivers/media/common/saa7146_fops.c
--- a/linux/drivers/media/common/saa7146_fops.c Tue Mar 02 23:52:36 2010 -0300
+++ b/linux/drivers/media/common/saa7146_fops.c Wed Mar 03 12:15:23 2010 +0100
@@ -481,8 +481,10 @@ int saa7146_vv_release(struct saa7146_de
DEB_EE(("dev:%p\n",dev));
v4l2_device_unregister(&dev->v4l2_dev);
- pci_free_consistent(dev->pci, SAA7146_CLIPPING_MEM, vv->d_clipping.cpu_addr,
vv->d_clipping.dma_handle);
- kfree(vv);
+ if (vv) {
+ pci_free_consistent(dev->pci, SAA7146_CLIPPING_MEM,
vv->d_clipping.cpu_addr, vv->d_clipping.dma_handle);
+ kfree(vv);
+ }
dev->vv_data = NULL;
dev->vv_callback = NULL;
diff -r 58ae12f18e80 linux/drivers/media/dvb/ttpci/av7110_v4l.c
--- a/linux/drivers/media/dvb/ttpci/av7110_v4l.c Tue Mar 02 23:52:36 2010 -0300
+++ b/linux/drivers/media/dvb/ttpci/av7110_v4l.c Wed Mar 03 12:15:23 2010 +0100
@@ -790,12 +790,20 @@ int av7110_init_v4l(struct av7110 *av711
vv_data = &av7110_vv_data_c;
else
vv_data = &av7110_vv_data_st;
+ ret = saa7146_vv_devinit(dev);
+
+ if (ret < 0) {
+ ERR(("cannot init device. skipping.\n"));
+ return ret;
+ }
+
ret = saa7146_vv_init(dev, vv_data);
-
- if (ret) {
+ if (ret < 0) {
ERR(("cannot init capture device. skipping.\n"));
+ saa7146_vv_release(dev);
return ret;
}
+
vv_data->ops.vidioc_enum_input = vidioc_enum_input;
vv_data->ops.vidioc_g_input = vidioc_g_input;
vv_data->ops.vidioc_s_input = vidioc_s_input;
Regards,
Hartmut
next reply other threads:[~2010-03-03 11:39 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-03 11:39 e9hack [this message]
2010-03-13 16:27 ` changeset 14351:2eda2bcc8d6f Hans Verkuil
2010-03-16 19:29 ` e9hack
2010-03-20 14:07 ` av7110 and budget_av are broken! (was: Re: changeset 14351:2eda2bcc8d6f) Oliver Endriss
2010-03-20 14:20 ` Hans Verkuil
2010-03-20 15:13 ` Oliver Endriss
2010-03-20 16:03 ` av7110 and budget_av are broken! e9hack
2010-03-20 21:37 ` Hans Verkuil
2010-03-22 19:34 ` e9hack
2010-04-21 6:29 ` e9hack
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=4B8E4A6F.2050809@googlemail.com \
--to=e9hack@googlemail.com \
--cc=dougsland@redhat.com \
--cc=hverkuil@xs4all.nl \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@redhat.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.