]> git.baikalelectronics.ru Git - kernel.git/commit
[media] s5p: fix error code path when failing to allocate DMA memory
authorMaurizio Lombardi <mlombard@redhat.com>
Fri, 27 Jun 2014 09:28:31 +0000 (06:28 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Mon, 21 Jul 2014 18:00:56 +0000 (15:00 -0300)
commitca1c5cca7427597436437c4f017ec350b7b2426a
tree6ec02bbe1ef256cd4b1f0457e91d97c7c6c8cf00
parenteba360d435863508480e21c9dfe259017fbb217f
[media] s5p: fix error code path when failing to allocate DMA memory

In the s5p_mfc_alloc_firmware() function there are some mistakes
where the code checks whether the DMA memory is properly allocated or
not.

First of all dma_alloc_coherent() returns NULL in case of error.
The code also checked two times fw_virt_addr, ignoring
the bank2_virt pointer.

Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c