[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)
commit919db5c3199cbd7cf503cdc42f3467a524d1f9ff
treefc79359b0e784a7ca42ad3cb7982176a3dbe968d
parent8e8a6b23f115906678252190c8fcf4168cc60fd5
[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