From 538f9630afbbe429ecbcdcf92536200293a8e4b3 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Tue, 7 Feb 2006 06:49:14 -0200 Subject: V4L/DVB (3318a): Makes Some symbols static. Some symbols at cx88-alsa were global. Making those static. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/cx88/cx88-alsa.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/media/video/cx88/cx88-alsa.c') diff --git a/drivers/media/video/cx88/cx88-alsa.c b/drivers/media/video/cx88/cx88-alsa.c index a2e36a1e5f5..2acccd6d49b 100644 --- a/drivers/media/video/cx88/cx88-alsa.c +++ b/drivers/media/video/cx88/cx88-alsa.c @@ -128,7 +128,7 @@ MODULE_PARM_DESC(debug,"enable debug messages"); * BOARD Specific: Sets audio DMA */ -int _cx88_start_audio_dma(snd_cx88_card_t *chip) +static int _cx88_start_audio_dma(snd_cx88_card_t *chip) { struct cx88_buffer *buf = chip->buf; struct cx88_core *core=chip->core; @@ -173,7 +173,7 @@ int _cx88_start_audio_dma(snd_cx88_card_t *chip) /* * BOARD Specific: Resets audio DMA */ -int _cx88_stop_audio_dma(snd_cx88_card_t *chip) +static int _cx88_stop_audio_dma(snd_cx88_card_t *chip) { struct cx88_core *core=chip->core; dprintk(1, "Stopping audio DMA\n"); @@ -613,7 +613,7 @@ static snd_kcontrol_new_t snd_cx88_capture_volume = { * Only boards with eeprom and byte 1 at eeprom=1 have it */ -struct pci_device_id cx88_audio_pci_tbl[] = { +static struct pci_device_id cx88_audio_pci_tbl[] = { {0x14f1,0x8801,PCI_ANY_ID,PCI_ANY_ID,0,0,0}, {0x14f1,0x8811,PCI_ANY_ID,PCI_ANY_ID,0,0,0}, {0, } -- cgit v1.2.3 From 31dcbf994b9eda784c620c8caa3a9dc67a9d0045 Mon Sep 17 00:00:00 2001 From: Duncan Sands Date: Tue, 14 Mar 2006 12:12:39 -0300 Subject: V4L/DVB (3488): Snd_cx88_create: don't dereference NULL core If the call to cx88_core_get returns a NULL value, it is dereferenced by cx88_reset, and perhaps by cx88_core_put. Spotted by the Coverity checker. Signed-off-by: Duncan Sands Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/cx88/cx88-alsa.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'drivers/media/video/cx88/cx88-alsa.c') diff --git a/drivers/media/video/cx88/cx88-alsa.c b/drivers/media/video/cx88/cx88-alsa.c index 2acccd6d49b..bffef1decc8 100644 --- a/drivers/media/video/cx88/cx88-alsa.c +++ b/drivers/media/video/cx88/cx88-alsa.c @@ -672,6 +672,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); @@ -688,11 +693,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 */ -- cgit v1.2.3