From 74de1fff4534ac5e366e6e0b78d54a79bfb2cd64 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Thu, 26 Mar 2009 17:44:38 -0300 Subject: [PATCH] --- yaml --- r: 138341 b: refs/heads/master c: fbc0ae205c5dfb1049a36f0a98cc9211a3a090bb h: refs/heads/master i: 138339: 7dc0a66f416f701e900d4cf68ea558b541f6fb0b v: v3 --- [refs] | 2 +- trunk/drivers/media/video/cx88/cx88-cards.c | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 3ba561e5c4a5..d947fd3af6b1 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: c01f1a5a241604c35f93f10e06253ca70e88ee4e +refs/heads/master: fbc0ae205c5dfb1049a36f0a98cc9211a3a090bb diff --git a/trunk/drivers/media/video/cx88/cx88-cards.c b/trunk/drivers/media/video/cx88/cx88-cards.c index b9def8cbcdab..348f6ef08b2a 100644 --- a/trunk/drivers/media/video/cx88/cx88-cards.c +++ b/trunk/drivers/media/video/cx88/cx88-cards.c @@ -3127,6 +3127,8 @@ struct cx88_core *cx88_core_create(struct pci_dev *pci, int nr) int i; core = kzalloc(sizeof(*core), GFP_KERNEL); + if (core == NULL) + return NULL; atomic_inc(&core->refcount); core->pci_bus = pci->bus->number; @@ -3157,6 +3159,11 @@ struct cx88_core *cx88_core_create(struct pci_dev *pci, int nr) pci_resource_len(pci, 0)); core->bmmio = (u8 __iomem *)core->lmmio; + if (core->lmmio == NULL) { + kfree(core); + return NULL; + } + /* board config */ core->boardnr = UNSET; if (card[core->nr] < ARRAY_SIZE(cx88_boards))