aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorAlan Cox <alan@lxorguk.ukuu.org.uk>2009-03-26 16:44:38 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-03-30 11:43:43 -0400
commitfbc0ae205c5dfb1049a36f0a98cc9211a3a090bb (patch)
treec37626d2989a157071b80d0e6699a11b8c16570d /drivers/media
parentc01f1a5a241604c35f93f10e06253ca70e88ee4e (diff)
V4L/DVB (11243): cx88: Missing failure checks
The ioremap one was reported in October 2007 (Bug 9146), the kmalloc one was blindingly obvious while looking at the ioremap one The bug suggests some other configuration for lots of I/O memory (32MB per device is ioremapped) but I'll leave that to the real maintainers Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/cx88/cx88-cards.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/media/video/cx88/cx88-cards.c b/drivers/media/video/cx88/cx88-cards.c
index b9def8cbcdab..348f6ef08b2a 100644
--- a/drivers/media/video/cx88/cx88-cards.c
+++ b/drivers/media/video/cx88/cx88-cards.c
@@ -3127,6 +3127,8 @@ struct cx88_core *cx88_core_create(struct pci_dev *pci, int nr)
3127 int i; 3127 int i;
3128 3128
3129 core = kzalloc(sizeof(*core), GFP_KERNEL); 3129 core = kzalloc(sizeof(*core), GFP_KERNEL);
3130 if (core == NULL)
3131 return NULL;
3130 3132
3131 atomic_inc(&core->refcount); 3133 atomic_inc(&core->refcount);
3132 core->pci_bus = pci->bus->number; 3134 core->pci_bus = pci->bus->number;
@@ -3157,6 +3159,11 @@ struct cx88_core *cx88_core_create(struct pci_dev *pci, int nr)
3157 pci_resource_len(pci, 0)); 3159 pci_resource_len(pci, 0));
3158 core->bmmio = (u8 __iomem *)core->lmmio; 3160 core->bmmio = (u8 __iomem *)core->lmmio;
3159 3161
3162 if (core->lmmio == NULL) {
3163 kfree(core);
3164 return NULL;
3165 }
3166
3160 /* board config */ 3167 /* board config */
3161 core->boardnr = UNSET; 3168 core->boardnr = UNSET;
3162 if (card[core->nr] < ARRAY_SIZE(cx88_boards)) 3169 if (card[core->nr] < ARRAY_SIZE(cx88_boards))