This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/cgit.cgi/media_tree.git tree:

Subject: [media] mantis: Fix error handling in mantis_dma_init()
Author:  Fabio Estevam <[email protected]>
Date:    Mon Aug 10 14:11:41 2015 -0300

Current code assigns 0 to variable 'err', which makes mantis_dma_init()
to return success even if mantis_alloc_buffers() fails.

Fix it by checking the return value from mantis_alloc_buffers() and
propagating it in the case of error.

Reported-by: RUC_Soft_Sec <[email protected]>
Signed-off-by: Fabio Estevam <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>

 drivers/media/pci/mantis/mantis_dma.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

---

http://git.linuxtv.org/cgit.cgi/media_tree.git/commit/?id=02387b5f25bdba668c7fe2618697bae24f973667

diff --git a/drivers/media/pci/mantis/mantis_dma.c 
b/drivers/media/pci/mantis/mantis_dma.c
index 1d59c7e..87990ec 100644
--- a/drivers/media/pci/mantis/mantis_dma.c
+++ b/drivers/media/pci/mantis/mantis_dma.c
@@ -130,10 +130,11 @@ err:
 
 int mantis_dma_init(struct mantis_pci *mantis)
 {
-       int err = 0;
+       int err;
 
        dprintk(MANTIS_DEBUG, 1, "Mantis DMA init");
-       if (mantis_alloc_buffers(mantis) < 0) {
+       err = mantis_alloc_buffers(mantis);
+       if (err < 0) {
                dprintk(MANTIS_ERROR, 1, "Error allocating DMA buffer");
 
                /* Stop RISC Engine */

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

Reply via email to