diff mbox

media: s5p_mfc: Check the right pointer after allocation

Message ID 1406088312-5205-1-git-send-email-zhaowei.yuan@samsung.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Zhaowei Yuan July 23, 2014, 4:05 a.m. UTC
It should be bank2_virt to be checked after dma allocation
instead of dev->fw_virt_addr.

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

--
1.7.9.5

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

Comments

Sylwester Nawrocki July 29, 2014, 1:23 p.m. UTC | #1
On 23/07/14 06:05, Zhaowei Yuan wrote:
> It should be bank2_virt to be checked after dma allocation
> instead of dev->fw_virt_addr.

This patch is not applicable to the media master branch [1].
Additionally, AFAICS dma_alloc_coherent return value should be tested
for NULL, rather than for ERR_PTR() value. It seems you have some
incorrect changes in your tree, which this patch depends on.

[1] http://git.linuxtv.org/cgit.cgi/media_tree.git
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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);