]> git.baikalelectronics.ru Git - kernel.git/commit
[media] mantis: Fix error handling in mantis_dma_init()
authorFabio Estevam <fabio.estevam@freescale.com>
Mon, 10 Aug 2015 17:11:41 +0000 (14:11 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Tue, 11 Aug 2015 13:28:41 +0000 (10:28 -0300)
commitcc8fa297599d7b7031880d51f1c30a37c1f7cf0e
treefc79359b0e784a7ca42ad3cb7982176a3dbe968d
parent4b6c868cb113cc7026a48b2cde5a6c5369eca3d9
[media] mantis: Fix error handling in mantis_dma_init()

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 <zy900702@163.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/pci/mantis/mantis_dma.c