summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhaowei Yuan <zhaowei.yuan@samsung.com>2014-07-17 20:01:37 +0800
committerMarek Szyprowski <m.szyprowski@samsung.com>2014-07-18 01:24:04 -0700
commit20a5914f5813a1bdfbfc8d6b9ab554495e91e349 (patch)
tree9312018c2646fb654a4ab55d6add8f09b71dd6a7
parent680638efcc1a3adc897ce8f9fc426455327f7ff5 (diff)
downloadlinux-3.10-20a5914f5813a1bdfbfc8d6b9ab554495e91e349.tar.gz
linux-3.10-20a5914f5813a1bdfbfc8d6b9ab554495e91e349.tar.bz2
linux-3.10-20a5914f5813a1bdfbfc8d6b9ab554495e91e349.zip
media: s5p_mfc: Check the right pointer after allocation
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.yuan@samsung.com>
-rw-r--r--drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c b/drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c
index dc1fc94a488..55ad8813533 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);