linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] media: s5p_mfc: Check the right pointer after allocation
@ 2014-07-23  0:48 Zhaowei Yuan
  0 siblings, 0 replies; 3+ messages in thread
From: Zhaowei Yuan @ 2014-07-23  0:48 UTC (permalink / raw)
  To: linux-media, k.debski, m.chehab, kyungmin.park, jtp.park
  Cc: linux-samsung-soc, Zhaowei Yuan

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH] media: s5p_mfc: Check the right pointer after allocation
@ 2014-07-23  4:05 Zhaowei Yuan
  2014-07-29 13:23 ` Sylwester Nawrocki
  0 siblings, 1 reply; 3+ messages in thread
From: Zhaowei Yuan @ 2014-07-23  4:05 UTC (permalink / raw)
  To: linux-media, k.debski, m.chehab, kyungmin.park, jtp.park
  Cc: linux-samsung-soc, Zhaowei Yuan

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

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] media: s5p_mfc: Check the right pointer after allocation
  2014-07-23  4:05 [PATCH] media: s5p_mfc: Check the right pointer after allocation Zhaowei Yuan
@ 2014-07-29 13:23 ` Sylwester Nawrocki
  0 siblings, 0 replies; 3+ messages in thread
From: Sylwester Nawrocki @ 2014-07-29 13:23 UTC (permalink / raw)
  To: Zhaowei Yuan
  Cc: linux-media, k.debski, m.chehab, kyungmin.park, jtp.park,
	linux-samsung-soc

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-07-29 13:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-23  4:05 [PATCH] media: s5p_mfc: Check the right pointer after allocation Zhaowei Yuan
2014-07-29 13:23 ` Sylwester Nawrocki
  -- strict thread matches above, loose matches on Subject: below --
2014-07-23  0:48 Zhaowei Yuan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).