The patch number 11243 was added via Mauro Carvalho Chehab <[email protected]>
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
        Linux Media Mailing List <[email protected]>

------

From: Alan Cox  <[email protected]>
[PATCH] 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 <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>


---

 linux/drivers/media/video/cx88/cx88-cards.c |    7 +++++++
 1 file changed, 7 insertions(+)

diff -r 70a36945a1a0 -r 0b4292a3badf linux/drivers/media/video/cx88/cx88-cards.c
--- a/linux/drivers/media/video/cx88/cx88-cards.c       Thu Mar 26 14:31:08 
2009 +0000
+++ b/linux/drivers/media/video/cx88/cx88-cards.c       Thu Mar 26 20:44:38 
2009 +0000
@@ -3160,6 +3160,8 @@ struct cx88_core *cx88_core_create(struc
        int i;
 
        core = kzalloc(sizeof(*core), GFP_KERNEL);
+       if (core == NULL)
+               return NULL;
 
        atomic_inc(&core->refcount);
        core->pci_bus  = pci->bus->number;
@@ -3189,6 +3191,11 @@ struct cx88_core *cx88_core_create(struc
        core->lmmio = ioremap(pci_resource_start(pci, 0),
                              pci_resource_len(pci, 0));
        core->bmmio = (u8 __iomem *)core->lmmio;
+
+       if (core->lmmio == NULL) {
+               kfree(core);
+               return NULL;
+       }
 
        /* board config */
        core->boardnr = UNSET;


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/0b4292a3badf55896b77de723e73f39275c1e65b

_______________________________________________
linuxtv-commits mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to