summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/cx88
diff options
context:
space:
mode:
authorMike Isely <isely@pobox.com>2006-03-14 21:58:45 -0600
committerMike Isely <isely@pobox.com>2006-03-14 21:58:45 -0600
commit1895621dbd8ab81d0545392d3b9dc64a9f3b4593 (patch)
treee3eb7ee9b5f9d8341a1c4b2c0dc5f135f59b6ef6 /linux/drivers/media/video/cx88
parentbb379778f6c9c6aa4dc340c342d5e81a0b9026dd (diff)
parent49c7ae95a0e651f7e2186509d62e7eb21ff6154c (diff)
downloadmediapointer-dvb-s2-1895621dbd8ab81d0545392d3b9dc64a9f3b4593.tar.gz
mediapointer-dvb-s2-1895621dbd8ab81d0545392d3b9dc64a9f3b4593.tar.bz2
Merge from master
From: Mike Isely <isely@pobox.com> Signed-off-by: Mike Isely <isely@pobox.com>
Diffstat (limited to 'linux/drivers/media/video/cx88')
-rw-r--r--linux/drivers/media/video/cx88/cx88-alsa.c10
-rw-r--r--linux/drivers/media/video/cx88/cx88-cards.c8
-rw-r--r--linux/drivers/media/video/cx88/cx88-core.c3
-rw-r--r--linux/drivers/media/video/cx88/cx88-video.c3
4 files changed, 11 insertions, 13 deletions
diff --git a/linux/drivers/media/video/cx88/cx88-alsa.c b/linux/drivers/media/video/cx88/cx88-alsa.c
index e5b9007c2..e6cc40e04 100644
--- a/linux/drivers/media/video/cx88/cx88-alsa.c
+++ b/linux/drivers/media/video/cx88/cx88-alsa.c
@@ -686,6 +686,11 @@ static int __devinit snd_cx88_create(snd_card_t *card, struct pci_dev *pci,
chip = (snd_cx88_card_t *) card->private_data;
core = cx88_core_get(pci);
+ if (NULL == core) {
+ err = -EINVAL;
+ kfree (chip);
+ return err;
+ }
if (!pci_dma_supported(pci,0xffffffff)) {
dprintk(0, "%s/1: Oops: no 32bit PCI DMA ???\n",core->name);
@@ -702,11 +707,6 @@ static int __devinit snd_cx88_create(snd_card_t *card, struct pci_dev *pci,
spin_lock_init(&chip->reg_lock);
cx88_reset(core);
- if (NULL == core) {
- err = -EINVAL;
- kfree (chip);
- return err;
- }
chip->core = core;
/* get irq */
diff --git a/linux/drivers/media/video/cx88/cx88-cards.c b/linux/drivers/media/video/cx88/cx88-cards.c
index cefc68e6c..73b7ed14f 100644
--- a/linux/drivers/media/video/cx88/cx88-cards.c
+++ b/linux/drivers/media/video/cx88/cx88-cards.c
@@ -325,19 +325,19 @@ struct cx88_board cx88_boards[] = {
.input = {{
.type = CX88_VMUX_TELEVISION,
.vmux = 0,
- .gpio0 = 0xbff0,
+ .gpio0 = 0xbff0,
},{
.type = CX88_VMUX_COMPOSITE1,
.vmux = 1,
- .gpio0 = 0xbff3,
+ .gpio0 = 0xbff3,
},{
.type = CX88_VMUX_SVIDEO,
.vmux = 2,
- .gpio0 = 0xbff3,
+ .gpio0 = 0xbff3,
}},
.radio = {
.type = CX88_RADIO,
- .gpio0 = 0xbff0,
+ .gpio0 = 0xbff0,
},
},
[CX88_BOARD_ASUS_PVR_416] = {
diff --git a/linux/drivers/media/video/cx88/cx88-core.c b/linux/drivers/media/video/cx88/cx88-core.c
index 24acfa2bd..e8bf7cf7c 100644
--- a/linux/drivers/media/video/cx88/cx88-core.c
+++ b/linux/drivers/media/video/cx88/cx88-core.c
@@ -232,8 +232,7 @@ int cx88_risc_stopper(struct pci_dev *pci, struct btcx_riscmem *risc,
void
cx88_free_buffer(struct pci_dev *pci, struct cx88_buffer *buf)
{
- if (in_interrupt())
- BUG();
+ BUG_ON(in_interrupt());
videobuf_waiton(&buf->vb,0,0);
videobuf_dma_pci_unmap(pci, &buf->vb.dma);
videobuf_dma_free(&buf->vb.dma);
diff --git a/linux/drivers/media/video/cx88/cx88-video.c b/linux/drivers/media/video/cx88/cx88-video.c
index 79126bc5c..4484744bc 100644
--- a/linux/drivers/media/video/cx88/cx88-video.c
+++ b/linux/drivers/media/video/cx88/cx88-video.c
@@ -392,8 +392,7 @@ static
void res_free(struct cx8800_dev *dev, struct cx8800_fh *fh, unsigned int bits)
{
struct cx88_core *core = dev->core;
- if ((fh->resources & bits) != bits)
- BUG();
+ BUG_ON((fh->resources & bits) != bits);
mutex_lock(&core->lock);
fh->resources &= ~bits;