[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)
commit69b9fe22b19b31d9de96d4a181f7206fd29ab743
tree6ec02bbe1ef256cd4b1f0457e91d97c7c6c8cf00
parent0ca1ba2aac5f6b26672099b13040c5b40db93486
[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