Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1701432

[PATCH] drm/tinydrm: mipi-dbi: Fix unbalanced DMA access

From David Lechner <david@lechnology.com>
Newsgroups linux.kernel
Subject [PATCH] drm/tinydrm: mipi-dbi: Fix unbalanced DMA access
Date 2017-08-01 22:20 +0200
Message-ID <u9LO2-9K-21@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


If we return here and import_attach is true, then dma_buf_end_cpu_access()
will not be called balance dma_buf_begin_cpu_access().

Fix by setting ret instead of returning.

Signed-off-by: David Lechner <david@lechnology.com>
---
 drivers/gpu/drm/tinydrm/mipi-dbi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/tinydrm/mipi-dbi.c b/drivers/gpu/drm/tinydrm/mipi-dbi.c
index c83eeb7..e10fa4b 100644
--- a/drivers/gpu/drm/tinydrm/mipi-dbi.c
+++ b/drivers/gpu/drm/tinydrm/mipi-dbi.c
@@ -183,7 +183,8 @@ static int mipi_dbi_buf_copy(void *dst, struct drm_framebuffer *fb,
 		dev_err_once(fb->dev->dev, "Format is not supported: %s\n",
 			     drm_get_format_name(fb->format->format,
 						 &format_name));
-		return -EINVAL;
+		ret = -EINVAL;
+		break;
 	}
 
 	if (import_attach)
-- 
2.7.4

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH] drm/tinydrm: mipi-dbi: Fix unbalanced DMA access David Lechner <david@lechnology.com> - 2017-08-01 22:20 +0200
  Re: [PATCH] drm/tinydrm: mipi-dbi: Fix unbalanced DMA access Noralf Trønnes <noralf@tronnes.org> - 2017-08-02 21:00 +0200
  Re: [PATCH] drm/tinydrm: mipi-dbi: Fix unbalanced DMA access David Lechner <david@lechnology.com> - 2017-08-04 00:50 +0200
    Re: [PATCH] drm/tinydrm: mipi-dbi: Fix unbalanced DMA access Noralf Trønnes <noralf@tronnes.org> - 2017-08-04 09:00 +0200
      Re: [PATCH] drm/tinydrm: mipi-dbi: Fix unbalanced DMA access David Lechner <david@lechnology.com> - 2017-08-07 20:10 +0200

csiph-web