It should be bank2_virt to be checked after dma allocation
instead of dev->fw_virt_addr.

Change-Id: I03ed5603de3ef1d97bf76d7d42097d9489b6b003
Signed-off-by: Zhaowei Yuan <zhaowei.y...@samsung.com>
---
 drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c 
b/drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c
index dc1fc94..55ad881 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c
@@ -50,7 +50,7 @@ int s5p_mfc_alloc_firmware(struct s5p_mfc_dev *dev)
                bank2_virt = dma_alloc_coherent(dev->mem_dev_r, 1 << 
MFC_BASE_ALIGN_ORDER,
                                        &bank2_dma_addr, GFP_KERNEL);

-               if (IS_ERR(dev->fw_virt_addr)) {
+               if (IS_ERR(bank2_virt)) {
                        mfc_err("Allocating bank2 base failed\n");
                        dma_free_coherent(dev->mem_dev_l, dev->fw_size,
                                dev->fw_virt_addr, dev->bank1);
--
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to